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

Feature Request: Enable hosting on sub path #531

Open
schinivision opened this issue Nov 20, 2024 · 1 comment
Open

Feature Request: Enable hosting on sub path #531

schinivision opened this issue Nov 20, 2024 · 1 comment

Comments

@schinivision
Copy link

It would be great if it could be possible to enable hosting on a subpath e.g. https://www.awesome-project.io/gramps-web

There is the possibility by using some nginx trickery to replace / extend most paths.

sub_filter_last_modified off;
# add base path to all static resources
sub_filter '<base href="/">' '<base href="/gramps-web/">';
sub_filter 'href="/' 'href="';
sub_filter 'src="/' 'src="';
#change path in manifest.js
sub_filter '"start_url": "/"' '"start_url": "/gramps-web/"';
# set types of files to 'sub-filter'
sub_filter_once off;
sub_filter_types text/html application/json text/css text/javascript application/javascript;
```

but as it seems the compiled js with the api calls has no configuration point for such a path.

Also changing the environment variable BASE_URL or GRAMPSWEB_BASE_URL had no effect when using the gramps-web container

Thanks for the great work

@DavidMStraub
Copy link
Member

I remember at some point we tried to make this work but it was a huge hassle to maintain and made a lot of things more complicated. If somebody volunteers to implement this without breaking anything I think it would be nice to have, so I'll leave this PR open. In the meantime, I recommend using subdomains (https://gramps-web.awesome-project.io).

@DavidMStraub DavidMStraub added enhancement New feature or request and removed enhancement New feature or request labels Nov 23, 2024
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

No branches or pull requests

2 participants