Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Link resolving includes hostname only in SHORT #38

Closed
philippguertler opened this issue Oct 10, 2018 · 3 comments · Fixed by gentics/mesh#889
Closed

Link resolving includes hostname only in SHORT #38

philippguertler opened this issue Oct 10, 2018 · 3 comments · Fixed by gentics/mesh#889
Assignees

Comments

@philippguertler
Copy link

Gentics Mesh Version, operating system, or hardware.

  • v0.22.3
  • Should also happen on 0.25.0

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

  • Create a node with a mesh link
  • Set a hostname for the branch
  • Get the node with ?resolveLinks=medium

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
Copy link
Contributor

Jotschi commented Oct 10, 2018

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
Copy link
Member

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
Copy link
Member

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).

@Jotschi Jotschi transferred this issue from gentics/mesh May 15, 2019
@philippguertler philippguertler self-assigned this Oct 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants