gentics / mesh-incubator

Project which is home for planned enhancements for Gentics Mesh
3 stars 0 forks source link

Link resolving includes hostname only in SHORT #38

Closed philippguertler closed 4 years ago

philippguertler commented 5 years ago

Gentics Mesh Version, operating system, or hardware.

Problem

When activating link resolving for fields in a node, the hostname that is set in the branch is only included when the link resolving is set to SHORT.

Reproducer

Expected behavior and actual behavior

I expected the link to include the hostname set in the branch. It is not included for medium and full.

This was implemented in #200 See https://github.com/gentics/mesh/blob/cad9e064d0beaebe2cb60986c23b4e5288c4c259/common/src/main/java/com/gentics/mesh/core/link/WebRootLinkReplacer.java#L224-L235

Jotschi commented 5 years ago

Not a bug. It makes no sense to include the host name with the mesh API's full path. Check this with @npomaroli - He added this feature.

npomaroli commented 5 years ago

There are use-cases, where you want mesh to render FULL links including protocol and hostname for accessing mesh itself. E.g. you let mesh render content with links (in FULL mode) and put that content inside an app, which would use the rendered URLs to download binary content. Since the app did not make the initial request to mesh, URLs without protocol and hostname (of mesh) do not make much sense.

npomaroli commented 5 years ago

For MEDIUM, adding the hostname (of the requested branch) would also make sense, in order to specify the targeted branch (project is included in the path).