From b67673d6413065f21b04c496ede2457186e8abea Mon Sep 17 00:00:00 2001 From: liberodark Date: Wed, 20 Feb 2019 15:54:09 +0100 Subject: [PATCH] update --- README.md | 2 -- conf/app.src | 7 ------- conf/nginx.conf | 30 +++++++++++++++++++++--------- 3 files changed, 21 insertions(+), 18 deletions(-) delete mode 100644 conf/app.src diff --git a/README.md b/README.md index 4ef9b5a..bfee8f3 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,6 @@ # Cockpit app for YunoHost Cockpit Server -# NOT WORK IS IN DEV - - [Yunohost project](https://yunohost.org) - [Cockpit website](https://cockpit-project.org/) diff --git a/conf/app.src b/conf/app.src deleted file mode 100644 index 506f768..0000000 --- a/conf/app.src +++ /dev/null @@ -1,7 +0,0 @@ -SOURCE_URL=https://github.com/MediaBrowser/Emby.Releases/releases/download/4.0.2.0/emby-server-deb_4.0.2.0_amd64.deb -SOURCE_SUM=8048da68873d2da8c67c1abf73b5383dc82cef49e9182e9872f11e5127b3b987cf33e995d0956b0cb33d113ae37fef3b2357974b98e9a290fdf618f5a04f42b8 -SOURCE_SUM_PRG=sha512sum -SOURCE_FORMAT=deb -SOURCE_IN_SUBDIR=false -SOURCE_EXTRACT=false -SOURCE_FILENAME=emby-server-deb.deb diff --git a/conf/nginx.conf b/conf/nginx.conf index 4193bce..b218038 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,13 +1,25 @@ -location ^~ __PATH__/ { +# Force usage of https + if ($scheme = http) { + rewrite ^ https://$server_name$request_uri? permanent; +} + +location __PATH__/ { proxy_pass http://127.0.0.1:__PORT__; - proxy_redirect off; - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-Proto $scheme; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Host $server_name; - proxy_http_version 1.1; + proxy_buffering off; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header Host $host; + proxy_set_header X-Forwarded-For $remote_addr; + # needed for websocket proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; -} \ No newline at end of file + # change scheme of "Origin" to http + proxy_set_header Origin http://$host; + + # Pass ETag header from cockpit to clients. + # See: https://github.com/cockpit-project/cockpit/issues/5239 + gzip off; +} + + # Include SSOWAT user panel. + include conf.d/yunohost_panel.conf.inc; \ No newline at end of file