Commit 0b615db4 authored by sonicaj's avatar sonicaj

Set Referer header in nginx configuration

parent 419f092d
...@@ -74,6 +74,7 @@ data: ...@@ -74,6 +74,7 @@ data:
location = /robots.txt { location = /robots.txt {
add_header Content-Type text/plain; add_header Content-Type text/plain;
proxy_set_header Referer "http://nginx";
return 200 "User-agent: *\nDisallow: /loleaflet/*\n"; return 200 "User-agent: *\nDisallow: /loleaflet/*\n";
} }
...@@ -82,6 +83,7 @@ data: ...@@ -82,6 +83,7 @@ data:
set $upstream_collabora collabora; set $upstream_collabora collabora;
proxy_pass http://$upstream_collabora:9980; proxy_pass http://$upstream_collabora:9980;
proxy_set_header Host $http_host; proxy_set_header Host $http_host;
proxy_set_header Referer "http://nginx";
} }
# WOPI discovery URL # WOPI discovery URL
...@@ -89,6 +91,7 @@ data: ...@@ -89,6 +91,7 @@ data:
set $upstream_collabora collabora; set $upstream_collabora collabora;
proxy_pass http://$upstream_collabora:9980; proxy_pass http://$upstream_collabora:9980;
proxy_set_header Host $http_host; proxy_set_header Host $http_host;
proxy_set_header Referer "http://nginx";
} }
# Capabilities # Capabilities
...@@ -96,6 +99,7 @@ data: ...@@ -96,6 +99,7 @@ data:
set $upstream_collabora collabora; set $upstream_collabora collabora;
proxy_pass http://$upstream_collabora:9980; proxy_pass http://$upstream_collabora:9980;
proxy_set_header Host $http_host; proxy_set_header Host $http_host;
proxy_set_header Referer "http://nginx";
} }
# main websocket # main websocket
...@@ -105,6 +109,7 @@ data: ...@@ -105,6 +109,7 @@ data:
proxy_set_header Upgrade $http_upgrade; proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade"; proxy_set_header Connection "Upgrade";
proxy_set_header Host $http_host; proxy_set_header Host $http_host;
proxy_set_header Referer "http://nginx";
proxy_read_timeout 36000s; proxy_read_timeout 36000s;
} }
...@@ -113,6 +118,7 @@ data: ...@@ -113,6 +118,7 @@ data:
set $upstream_collabora collabora; set $upstream_collabora collabora;
proxy_pass http://$upstream_collabora:9980; proxy_pass http://$upstream_collabora:9980;
proxy_set_header Host $http_host; proxy_set_header Host $http_host;
proxy_set_header Referer "http://nginx";
} }
# Admin Console websocket # Admin Console websocket
...@@ -122,6 +128,7 @@ data: ...@@ -122,6 +128,7 @@ data:
proxy_set_header Upgrade $http_upgrade; proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade"; proxy_set_header Connection "Upgrade";
proxy_set_header Host $http_host; proxy_set_header Host $http_host;
proxy_set_header Referer "http://nginx";
proxy_read_timeout 36000s; proxy_read_timeout 36000s;
} }
......
{{ $values := (. | mustDeepCopy) }}
{{ $_ := set $values "common" (dict "nameSuffix" "nginx") }}
{{ include "common.deployment.common_config" $values | nindent 0 }}
spec: {{ include "common.deployment.common_spec" $values | nindent 2 }}
template: {{ include "common.deployment.pod.metadata" $values | nindent 4 }}
spec:
containers:
- name: {{ .Chart.Name }}-nginx
image: {{ printf "%s:%s" .Values.nginx.image.repository .Values.nginx.image.tag }}
imagePullPolicy: {{ .Values.nginx.image.pullPolicy }}
ports:
- name: http
containerPort: 80
protocol: TCP
- name: https
containerPort: 443
protocol: TCP
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment