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
{{ message }}
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.
I am running an angular 9 application behind nginx which is setup as a reverse proxy. When a request is forwarded to the angular application I use a proxy_pass. This passes the request on to the angular application. I have configured the reverse proxy to forward any request to /public so in other words if I do a request to http://localhost (Nginx) it sends the request to http://locahost:4200/public (Angular).
I log the url in my angular application using the following code:
According to angular the route url is /. It should be /public. I am guessing that angular is using window.location (http://localhost) instead of the url in the request (http://localhost:4200/public).
Is this the case and if so how can this be changed because this means that Angular is useless behind a proxy where I want to forward to a different url?
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I am running an angular 9 application behind nginx which is setup as a reverse proxy. When a request is forwarded to the angular application I use a proxy_pass. This passes the request on to the angular application. I have configured the reverse proxy to forward any request to /public so in other words if I do a request to http://localhost (Nginx) it sends the request to http://locahost:4200/public (Angular).
I log the url in my angular application using the following code:
According to angular the route url is /. It should be /public. I am guessing that angular is using window.location (http://localhost) instead of the url in the request (http://localhost:4200/public).
Is this the case and if so how can this be changed because this means that Angular is useless behind a proxy where I want to forward to a different url?
The text was updated successfully, but these errors were encountered: