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

Add support for reverse proxy #102

Open
T3rm1 opened this issue Dec 1, 2023 · 4 comments · May be fixed by #109
Open

Add support for reverse proxy #102

T3rm1 opened this issue Dec 1, 2023 · 4 comments · May be fixed by #109
Assignees

Comments

@T3rm1
Copy link

T3rm1 commented Dec 1, 2023

Self hosting is currently only possible if you don't have a path in the url because all links are absolute. This makes it impossible to use a reverse proxy to map to e.g. https://www.example.com/chatpadai/
Please add support for this. You might want to take a look at the documentation of the base tag.

@zer0ish
Copy link

zer0ish commented Jan 11, 2024

I'm behind a reverse proxy and have no issues.

Pfsense for router with Cloudflare, server is unraid and using Nginx Proxy Manager.
I use ai.mydomain.net where mydomain.net is the main website.
Also had no issues using HAProxy on pfsense.

@T3rm1
Copy link
Author

T3rm1 commented Jan 11, 2024

What you do is something different. Of course it works behind a reverse proxy and a separate sub domain. But it won't work if you require a non root path.

@ItzDerock ItzDerock self-assigned this Feb 5, 2024
@ItzDerock ItzDerock linked a pull request Feb 5, 2024 that will close this issue
@ItzDerock
Copy link
Collaborator

@T3rm1 Are you able to see if my PR fixes your issue?
My PR adds an environment variable called BASEPATH that can be set, for example, to /chatpadai.
This will update the site <base> tag and lets react router know of the new basepath.

It will not serve the files for you under the new basepath though, you will have to configure a reverse proxy to do that for you. Let me know if this is a problem, and I can make it update the container's webserver to serve under the specified base path.

@T3rm1
Copy link
Author

T3rm1 commented Feb 7, 2024

I checkout out your branch and tested it but it doesn't work. JS and CSS files are sill requested from root path which won't work.

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