cleanup and integrate nginx server changes for image preview
This commit is contained in:
@@ -1,22 +0,0 @@
|
||||
# In den bestehenden HTTPS-server-Block aufnehmen.
|
||||
# Passwortdatei außerhalb des Projekt-/Webverzeichnisses ablegen.
|
||||
location ^~ /moderation/api/ {
|
||||
if ($scheme != https) { return 403; }
|
||||
auth_basic "Wegwichtel Moderation";
|
||||
auth_basic_user_file /etc/nginx/wegwichtel-moderation.htpasswd;
|
||||
limit_except GET { deny all; }
|
||||
|
||||
proxy_pass http://127.0.0.1:47145/api/;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_set_header Authorization "";
|
||||
proxy_cache off;
|
||||
proxy_hide_header Cache-Control;
|
||||
add_header Cache-Control "no-store" always;
|
||||
add_header X-Content-Type-Options "nosniff" always;
|
||||
add_header X-Frame-Options "SAMEORIGIN" always;
|
||||
add_header Referrer-Policy "no-referrer" always;
|
||||
}
|
||||
@@ -43,6 +43,26 @@ server {
|
||||
add_header X-Frame-Options "SAMEORIGIN" always;
|
||||
add_header Referrer-Policy "strict-origin-when-cross-origin" always;
|
||||
|
||||
# Passwortdatei außerhalb des Projekt-/Webverzeichnisses ablegen.
|
||||
location ^~ /moderation/api/ {
|
||||
if ($scheme != https) { return 403; }
|
||||
auth_basic "Wegwichtel Moderation";
|
||||
auth_basic_user_file /etc/nginx/wegwichtel-moderation.htpasswd;
|
||||
limit_except GET { deny all; }
|
||||
|
||||
proxy_pass http://127.0.0.1:47145/api/;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_set_header Authorization "";
|
||||
proxy_cache off;
|
||||
proxy_hide_header Cache-Control;
|
||||
add_header Cache-Control "no-store" always;
|
||||
add_header Referrer-Policy "no-referrer" always;
|
||||
}
|
||||
|
||||
location / {
|
||||
proxy_pass http://127.0.0.1:47145;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user