mirror of
https://github.com/Websoft9/websoft9.git
synced 2025-01-23 17:40:35 +08:00
Update initproxy.conf
This commit is contained in:
parent
6ccf71044d
commit
0cb8faf95a
@ -79,46 +79,6 @@ server {
|
||||
sub_filter_once off;
|
||||
}
|
||||
|
||||
location /kopia {
|
||||
set $auth $cookie_auth;
|
||||
if ($auth = "") {
|
||||
set $auth $arg_id;
|
||||
add_header Set-Cookie "auth=$auth; Path=/; HttpOnly";
|
||||
}
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Forwarded-Scheme $scheme;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_set_header X-Forwarded-For $remote_addr;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-Prefix /kopia;
|
||||
proxy_pass http://websoft9-kopia:51515/;
|
||||
rewrite ^/kopia/(.*)$ /$1 break;
|
||||
proxy_http_version 1.1;
|
||||
proxy_redirect off;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_cache_bypass $http_upgrade;
|
||||
proxy_set_header Connection $http_connection;
|
||||
proxy_cache_bypass $http_secret_header;
|
||||
proxy_set_header Accept-Encoding "";
|
||||
proxy_set_header Authorization "Basic $auth";
|
||||
add_header Pragma "no-cache";
|
||||
add_header Cache-Control "no-cache";
|
||||
# source changes
|
||||
sub_filter 'href="/' 'href="/kopia/';
|
||||
sub_filter 'src="/' 'src="/kopia/';
|
||||
sub_filter '/api' '/kopia/api';
|
||||
sub_filter '/assets' '/kopia/assets';
|
||||
sub_filter '/static/' '/kopia/static/';
|
||||
# script changes
|
||||
sub_filter 'e.runningTaskCount;return(0,k.jsx)(Qr,{' 'e.runningTaskCount;return(0,k.jsx)(Qr,{basename: "/kopia",';
|
||||
sub_filter 'window.location.replace("/' 'window.location.replace("/kopia/';
|
||||
sub_filter '"/kopia-flat.svg"' '"/kopia/kopia-flat.svg"';
|
||||
sub_filter 'href:"/"' 'href:"/kopia/"';
|
||||
sub_filter 'href:"/snapshots/new"' 'href:"/kopia/snapshots/new"';
|
||||
sub_filter_types text/css text/javascript application/javascript;
|
||||
sub_filter_once off;
|
||||
}
|
||||
|
||||
location / {
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection $http_connection;
|
||||
|
Loading…
Reference in New Issue
Block a user