You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When building the app with a custom base path, either through the Docker UI_PUBLIC_URL arg or the NPM build flag directly, no pages in the UI load properly. Instead, every page will get routed to the NotFoundPage.
To Reproduce
Steps to reproduce the behavior:
Run the app with a custom base path of photoview with the right Docker Compose and NGINX configs:
# Modify the Dockerfile photoview config to build locally for a custom path, e.g:photoview:
build:
context: .args:
- UI_PUBLIC_URL=/photoview/
- REACT_APP_API_ENDPOINT=https://djv.ddns.net/photoview/api
# An example nginx config for a server to redirect custom base pathset$photoview127.0.0.1;
location/photoview {
return302$scheme://$host/photoview/;
}
location/photoview/ {
# Rewrite to strip /photoview from URL pathrewrite^/photoview/?(.*)$ /$1 break;
proxy_pass http://$photoview:8444;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header Host $host;
proxy_http_version1.1; # to keep aliveproxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
Navigate to the app being served at your url: http://my-server/photoview
Observe that the page displays "Page not found", indicating that it's routing to NotFoundPage
Check the network tab; you'll see that there is no request for the LoginPage component
Expected behavior
The app should first properly redirect to and load the login page
Screenshots
Your environment:
Feel free to remove and add what you think might be useful.
Describe the bug
When building the app with a custom base path, either through the Docker
UI_PUBLIC_URL
arg or the NPM build flag directly, no pages in the UI load properly. Instead, every page will get routed to theNotFoundPage
.To Reproduce
Steps to reproduce the behavior:
photoview
with the right Docker Compose and NGINX configs:http://my-server/photoview
NotFoundPage
LoginPage
componentExpected behavior
The app should first properly redirect to and load the login page
Screenshots
Your environment:
Feel free to remove and add what you think might be useful.
Additional context
One solution to this is to modify the
Router
component to use the configured base path:The text was updated successfully, but these errors were encountered: