Open samcro1967 opened 3 years ago
would like to have this as well. When using a reverse proxy I am getting this
2021/07/22 07:43:28 websocket: the client is not using the websocket protocol: 'upgrade' token not found in 'Connection' header
I got this working with turning on websockets,Asset Caching,and HSTS in my config. @samcro1967
example config
server { set $forward_scheme http; set $server "192.168.1.x"; set $port 8181;
listen 8080; listen [::]:8080;
listen 4443 ssl http2; listen [::]:4443;
server_name subdomain.domain.com;
include conf.d/include/letsencrypt-acme-challenge.conf; include conf.d/include/ssl-ciphers.conf; ssl_certificate /etc/letsencrypt/live/npm-37/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/npm-37/privkey.pem;
include conf.d/include/assets.conf;
add_header Strict-Transport-Security "max-age=63072000; preload" always;
include conf.d/include/force-ssl.conf;
proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection $http_connection; proxy_http_version 1.1;
access_log /data/logs/proxy_host-15.log proxy;
location / {
add_header Strict-Transport-Security "max-age=63072000; preload" always;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $http_connection;
proxy_http_version 1.1;
# Proxy!
include conf.d/include/proxy.conf;
}
include /data/nginx/custom/server_proxy[.]conf; }
Glad you got it working. I am using Caddy instead of nginx, but it may help others down the road.
@evan-buss Is this something you can add to a future releaae?
@samcro1967 @sbelongie
I've added application support for specifying the base path. Please try it out and let me know if you have any issues. You may have to adjust your reverse proxy settings, but they should be a lot simpler.
Works perfectly. Thanks!
This seems to have stopped working since the last update.
Hmm. I will take a look. Thanks for reporting!
A little more testing and what I found...
I was only serving this up with caddy externally. I setup caddy to serve it internally and it works as expected. Externally it seems to work with Edge, but not Chrome. Externally in Chrome, sometimes I get page not found, other times I get a partially loaded page (screen shot below). Clearing Chrome cache got me a little further, but it still does not load the same in Chrome externally as it does internally or with Edge externally. I also tried private mode in both Edge and Chrome. They both work internally, but neither works externally.
Externally before clearing Chrome Cache
Externally after clearing Chrome cache
How it looks in Edge externally
when i put mine is baseurl https://domain.com/services/openbooks i get a 404 error
I have it working with npm as proxy host
Add proxy host, set up domain names Scheme http forward to container name or ip port 80 Set Websockets Support on
Add custom locations / forward to ip or container name/openbooks/ port 80 add these on the cogwheel
add_header Strict-Transport-Security "max-age=63072000; preload" always; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection $http_connection;
Set up SSL with all things enabled And last on Advanced add_header Strict-Transport-Security "max-age=63072000; preload" always;
With all of that i made it work perfectly behind nginx proxy manager
Is there a way to have it listen on http://ip:port/baseurl instead of http://ip:port for putting behind a reverse proxy?