Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 17 additions & 4 deletions config/nginx.conf.template
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ http {
add_header 'Content-Length' 0;
return 204;
}

proxy_pass http://$api;
proxy_redirect off;
proxy_http_version 1.1;
Expand Down Expand Up @@ -137,7 +137,7 @@ http {
add_header 'Content-Length' 0;
return 204;
}

proxy_pass http://$auth;
}

Expand All @@ -161,7 +161,7 @@ http {
add_header 'Access-Control-Allow-Methods' 'POST, GET, OPTIONS, DELETE, PUT, PATCH' always;
add_header 'Access-Control-Allow-Headers' 'Accept,Authorization,Cache-Control,Content-Type,DNT,If-Modified-Since,Keep-Alive,Origin,User-Agent,X-Requested-With' always;
}

proxy_pass http://$auth;
proxy_redirect off;
proxy_http_version 1.1;
Expand Down Expand Up @@ -194,6 +194,19 @@ http {
proxy_read_timeout 2m;
}

location /outlook/manifest.xml {
proxy_pass http://$staff/api/staff/v1/outlook/manifest.xml;
proxy_redirect off;
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 https;
proxy_connect_timeout 1m;
proxy_send_timeout 2m;
proxy_read_timeout 2m;
}

location ~* ^/(favicon\.ico|index\.html|login|nginx-error|scripts|styles|.*\.webmanifest)($|/) {
root /etc/nginx/html;
try_files $uri $uri/index.html =404;
Expand Down Expand Up @@ -268,7 +281,7 @@ http {
local raw_hmac = h:final(data)
local expected_hmac = resty_string.to_hex(raw_hmac)

-- Compare the digest with the verify part of the cookie
-- Compare the digest with the verify part of the cookie
if expected_hmac ~= signature then
local redirect_uri = "/auth/login?continue=" .. ngx.escape_uri(ngx.var.request_uri)
ngx.redirect(redirect_uri)
Expand Down