administrator@astra-77777:~$ sudo docker exec nsms-nginx-1 sh -c 'cat /etc/nginx/snippets/api.location.conf'
# backend signalR services
location ~ ^/api/signalr {
proxy_pass http://$web_api;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $http_connection;
proxy_cache_bypass $http_upgrade;
proxy_set_header Host $host;
proxy_connect_timeout 6000;
proxy_send_timeout 6000;
proxy_read_timeout 6000;
send_timeout 6000;
proxy_buffering off;
#Mask access_token in access.log
set $temp_request $request;
if ($temp_request ~ (?<str_before_token>.*)access_token=[A-Za-z0-9-_=]+\.[A-Za-z0-9-_=]+\.?[A-Za-z0-9-_.+/=]*(?<str_after_token>.*)) {
set $masked_token '*******';
set $request_with_masked_token ${str_before_token}access_token=${masked_token}${str_after_token};
access_log /dev/stdout log_with_masked_token;
}
}
# KcWebApiService
location ~ ^/api/kc {
proxy_pass http://$kc_web_api_service;
include ./snippets/api.conf;
}
# configuration service
location ~ ^/api/settings {
proxy_pass http://$configuration_service;
include ./snippets/api.conf;
}
# backend rest services
location ~ ^/api {
proxy_pass http://$web_api;
include ./snippets/api.conf;
}
# backend health check
location ~ ^/hc {
proxy_pass http://$web_api;
include ./snippets/api.conf;
}
# swagger ui
location ~ ^/swagger {
proxy_pass http://$web_api;
include ./snippets/api.conf;
}administrator@astra-77777:~$