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

frontend can't be deployed on subpath #610

Closed
milanmajchrak opened this issue Apr 29, 2024 · 8 comments · Fixed by #742
Closed

frontend can't be deployed on subpath #610

milanmajchrak opened this issue Apr 29, 2024 · 8 comments · Fixed by #742

Comments

@milanmajchrak
Copy link
Collaborator

milanmajchrak commented Apr 29, 2024

Original issue: ufal/clarin-dspace#1027

@kosarko
Copy link

kosarko commented Oct 10, 2024

ufal-showstopper see the last paragraph in ufal/clarin-dspace#1027 (comment)

@milanmajchrak
Copy link
Collaborator Author

Slack question:

Hi all, I'm struggling to change the DSPACE_REST_NAMESPACE for the server when starting DSpace via Docker. When I modify the DSPACE_REST_NAMESPACE property to DSPACE_REST_NAMESPACE=/repository/server, the backend (BE) still runs on localhost:8080/server instead of localhost:8080/repository/server. However, the BE configuration property dspace.server is updated to localhost:8080/repository/server.
Despite the configuration change, the backend continues running on the old path. When I check the running backend, it looks like this:
Do you know an easy way to change the REST namespace when running DSpace via Docker?

Image

@milanmajchrak
Copy link
Collaborator Author

milanmajchrak commented Oct 29, 2024

I would like to update the Dockerfile to get namespace from the .env. https://github.com/dataquest-dev/DSpace/blob/dtq-dev/Dockerfile#L63

Technical talk needed

@milanmajchrak
Copy link
Collaborator Author

milanmajchrak commented Nov 8, 2024

Slack question:

Hi all, I'm struggling to change the DSPACE_REST_NAMESPACE for the server when starting DSpace via Docker. When I modify the DSPACE_REST_NAMESPACE property to DSPACE_REST_NAMESPACE=/repository/server, the backend (BE) still runs on localhost:8080/server instead of localhost:8080/repository/server. However, the BE configuration property dspace.server is updated to localhost:8080/repository/server.
Despite the configuration change, the backend continues running on the old path. When I check the running backend, it looks like this:
Do you know an easy way to change the REST namespace when running DSpace via Docker?

Image

The issue is that the Referer in the UI request does not include the /repository/ namespace. Due to the Referrer Policy: strict-origin-when-cross-origin, the UI request ignores the namespace if the UI and backend have different URLs (i.e., different ports).

So when the UI and BE has the same URL (origin) everything will work correctly.

@milanmajchrak
Copy link
Collaborator Author

#730

@milanmajchrak
Copy link
Collaborator Author

I've written down the steps how to set up namespace properly: https://github.com/dataquest-dev/DSpace/wiki/Custom-namespace

@milanmajchrak
Copy link
Collaborator Author

milanmajchrak commented Nov 19, 2024

TODO: think how to change assets file paths when namespace is set.

@milanmajchrak
Copy link
Collaborator Author

milanmajchrak commented Nov 21, 2024

Images without namespace:

  • from discojuice.js
  • dariah-eu.png
  • clarin.png
  • images/mime/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants