Skip to content

Commit 182d8f4

Browse files
committed
proxy host
1 parent f72e3b3 commit 182d8f4

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

proxy.nginx

+9-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ access_log off;
33
error_log /dev/stdout info;
44
charset utf-8;
55

6-
76
client_body_buffer_size 20M; # Default er satt veldig lavt. Får problemer med enkelte dokument queries.
87

98
# Expires map
@@ -23,6 +22,7 @@ map $upstream_http_cache_control $custom_cache_control {
2322
server {
2423
listen "${APP_PORT}";
2524
server_name "${APP_HOSTNAME}";
25+
2626
# Proxy headers. Will be overwritten if you set them in blocks.
2727
proxy_buffers 16 32k;
2828
proxy_buffer_size 32k;
@@ -41,12 +41,12 @@ server {
4141

4242
add_header Cache-Control $custom_cache_control;
4343

44+
# Health check for NAIS
4445
location = /k9/feature-toggle/toggles.json {
4546
add_header Content-Type application/json;
4647
root /tmp/;
4748
}
4849

49-
# Health check for NAIS
5050
location = /isAlive {
5151
return 200 "Application:UP";
5252
add_header Content-Type text/plain;
@@ -58,8 +58,8 @@ server {
5858
add_header Content-Type text/plain;
5959
}
6060

61-
6261
location "/k9/sak/" {
62+
proxy_set_header Host $http_host;
6363
proxy_pass "${APP_URL}";
6464
proxy_intercept_errors on;
6565
error_page 401 = @401_json;
@@ -69,6 +69,7 @@ server {
6969
}
7070

7171
location "/k9/formidling/" {
72+
proxy_set_header Host $http_host;
7273
proxy_pass "${APP_URL_K9FORMIDLING}";
7374
proxy_intercept_errors on;
7475
error_page 401 = @401_json;
@@ -78,6 +79,7 @@ server {
7879
}
7980

8081
location "/k9/formidling/dokumentdata" {
82+
proxy_set_header Host $http_host;
8183
proxy_pass "${APP_URL_K9FORMIDLING_DD}";
8284
proxy_intercept_errors on;
8385
error_page 401 = @401_json;
@@ -87,6 +89,7 @@ server {
8789
}
8890

8991
location "/k9/oppdrag/" {
92+
proxy_set_header Host $http_host;
9093
proxy_pass "${APP_URL_K9OPPDRAG}";
9194
proxy_intercept_errors on;
9295
error_page 401 = @401_json;
@@ -96,6 +99,7 @@ server {
9699
}
97100

98101
location "/k9/klage/" {
102+
proxy_set_header Host $http_host;
99103
proxy_pass "${APP_URL_KLAGE}";
100104
proxy_intercept_errors on;
101105
error_page 401 = @401_json;
@@ -105,6 +109,7 @@ server {
105109
}
106110

107111
location "/k9/tilbake/" {
112+
proxy_set_header Host $http_host;
108113
proxy_pass "${APP_URL_K9TILBAKE}";
109114
proxy_intercept_errors on;
110115
error_page 401 = @401_json;
@@ -114,6 +119,7 @@ server {
114119
}
115120

116121
location "/k9/fordel/" {
122+
proxy_set_header Host $http_host;
117123
proxy_pass "${APP_URL_K9FORDEL}";
118124
proxy_intercept_errors on;
119125
error_page 401 = @401_json;

0 commit comments

Comments
 (0)