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
None of the options mentioned in #539 to set the base URL of Homepage worked for me. Homepage always tries to (incorrectly) get web resources from the root of the site. Therefore I made a workaround.
Do not configure option base in settings.yaml. Use the following nginx snippet to rewrite incoming requests to and outgoing responses from Homepage:
location ~ ^/homepage($|/.*) {
set $app 'homepage';
# Strip prefix path from request URL to pass to the server
rewrite ^/homepage/?(.*)$ /$1 break;
proxy_pass http://localhost:3000;
# Redirect location header of proxied server responses
proxy_redirect ^ /$app;
# Sub filters to replace hardcoded paths in served web content
proxy_set_header Accept-Encoding "";
sub_filter_once off;
sub_filter_types *;
sub_filter '/_next/' '/$app/_next/';
sub_filter '/api/' '/$app/api/';
sub_filter '/android-' '/$app/android-';
sub_filter '/apple-' '/$app/apple-';
sub_filter '/favicon-' '/$app/favicon-';
}
A valid (example) URL for the above configuration is: https://domain.example/homepage. A trailing slash is not required but works as well.
In my (limited) testing, all responses from Homepage return HTTP code 200 with the above configuration.
This is a workaround, not a proper solution. Things might break in the future due to changes in Homepage. Therefore, full support for configuring the base URL from within Homepage can be considered a feature request.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
None of the options mentioned in #539 to set the base URL of Homepage worked for me. Homepage always tries to (incorrectly) get web resources from the root of the site. Therefore I made a workaround.
Do not configure option
base
in settings.yaml. Use the following nginx snippet to rewrite incoming requests to and outgoing responses from Homepage:A valid (example) URL for the above configuration is: https://domain.example/homepage. A trailing slash is not required but works as well.
In my (limited) testing, all responses from Homepage return HTTP code 200 with the above configuration.
This is a workaround, not a proper solution. Things might break in the future due to changes in Homepage. Therefore, full support for configuring the base URL from within Homepage can be considered a feature request.
Beta Was this translation helpful? Give feedback.
All reactions