Hello,
I’m trying to set up a reverse proxy for application that uses angularjs as a front end (GitHub - theotherp/nzbhydra: Meta search for NZB indexers) on FreeBSD 11.0-release and using Caddy 0.9.5.
The app is set to use the subfolder /hydra and i have tested the following configuration works in nginx
location /hydra/ {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://127.0.0.1:5075/hydra/;
}
The equivalent i have for caddy is
proxy /hydra/ http://127.0.0.1:5075/hydra/ {
header_upstream X-Forwarded-For {remote}
}
But this breaks the app with a load of errors
The stylesheet http://nzb.exampe.com/hydra/static/css/alllibs.css was not loaded because its MIME type, “text/html”, is not “text/css”. hydra
The stylesheet http://nzb.example.com/hydra/static/css/grey.css was not loaded because its MIME type, “text/html”, is not “text/css”. hydra
SyntaxError: expected expression, got '<'[Learn More] alllibs.js:1
SyntaxError: expected expression, got '<'[Learn More] nzbhydra.js:1
ReferenceError: apiCheck is not defined[Learn More] hydra:51:5
If i remove all references to the subfolder and proxy just using using the subdomain e.g
(url) rather than (url)/hydra/ then everything also works in caddy.
My presumption is that the app is not at fault as the configuration works with the subfolder in nginx and without the subfolder everything works in caddy am i missing something from the above caddy configuration ?
Thanks