nginx-proxy/default.conf

198 lines
7.4 KiB
Plaintext
Raw Normal View History

2023-05-07 11:03:39 +00:00
server {
root /usr/share/nginx/html;
index index.html index.htm index.nginx-debian.html;
server_name _; # managed by Certbot
2023-07-04 00:09:17 +00:00
client_max_body_size 50M;
2023-05-07 11:52:43 +00:00
location /auth {
if ($request_method = OPTIONS) {
add_header Access-Control-Allow-Origin $http_origin always;
add_header Access-Control-Allow-Credentials true always;
2023-05-07 19:16:18 +00:00
add_header Access-Control-Allow-Headers content-type,authorization always;
2023-05-07 11:52:43 +00:00
return 200;
}
if ($host = admin.pena.digital) {
proxy_pass http://admin-auth-service:8080;
}
if ($host != admin.pena.digital) {
proxy_pass http://pena-auth-service:8080;
}
proxy_hide_header Access-Control-Allow-Origin;
add_header Access-Control-Allow-Origin $http_origin always;
add_header Access-Control-Allow-Credentials true always;
}
2023-05-09 18:49:30 +00:00
location /user/ {
2023-05-31 16:28:04 +00:00
if ($request_method = OPTIONS) {
add_header Access-Control-Allow-Origin $http_origin always;
add_header Access-Control-Allow-Credentials true always;
2023-05-31 17:00:53 +00:00
add_header Access-Control-Allow-Headers content-type,authorization always;
2023-05-31 16:40:53 +00:00
add_header Access-Control-Allow-Methods OPTIONS,GET,POST,PATCH,PUT,DELETE;
2023-05-31 16:28:04 +00:00
return 200;
}
2023-05-07 19:29:36 +00:00
add_header Access-Control-Allow-Origin $http_origin always;
add_header Access-Control-Allow-Credentials true always;
add_header Access-Control-Allow-Headers content-type,authorization always;
2023-05-31 16:28:04 +00:00
add_header Access-Control-Allow-Methods OPTIONS,GET,POST,PATCH,PUT,DELETE;
2023-05-07 11:52:43 +00:00
proxy_pass http://pena-auth-service:8080;
}
location /swagger/ {
proxy_pass http://pena-auth-service:8080/;
}
location /cookie {
add_header Access-Control-Allow-Origin $http_origin;
add_header Access-Control-Allow-Credentials true;
add_header Set-Cookie "test=sameshit;SameSite=None;HttpOnly;Secure;";
return 200;
}
location /heruvym/ {
add_header Access-Control-Allow-Origin $http_origin always;
2023-05-07 19:29:36 +00:00
add_header Access-Control-Allow-Credentials true always;
2023-08-20 19:06:33 +00:00
add_header Access-Control-Allow-Headers content-type,authorization,sess always;
2023-05-11 16:24:12 +00:00
add_header Access-Control-Allow-Methods OPTIONS,GET,POST,PATCH,PUT,DELETE;
2023-05-07 11:52:43 +00:00
proxy_set_header Referer $host;
proxy_set_header Origin $http_origin;
proxy_set_header Connection '';
proxy_http_version 1.1;
chunked_transfer_encoding off;
proxy_buffering off;
proxy_cache off;
proxy_pass https://10.6.0.11:1488/;
}
location /strator/ {
2023-06-01 18:37:28 +00:00
if ($request_method = OPTIONS) {
add_header Access-Control-Allow-Origin $http_origin always;
2023-05-07 19:29:36 +00:00
add_header Access-Control-Allow-Credentials true always;
add_header Access-Control-Allow-Headers content-type,authorization always;
2023-06-01 18:37:28 +00:00
add_header Access-Control-Allow-Methods OPTIONS,GET,POST,PATCH,PUT,DELETE;
return 200;
}
add_header Access-Control-Allow-Origin $http_origin always;
add_header Access-Control-Allow-Credentials true always;
add_header Access-Control-Allow-Headers content-type,authorization always;
add_header Access-Control-Allow-Methods OPTIONS,GET,POST,PATCH,PUT,DELETE;
2023-05-07 11:52:43 +00:00
proxy_pass http://hub-admin-backend-service:8005/;
}
2023-06-11 16:42:03 +00:00
2023-06-23 15:42:29 +00:00
location /customer/ {
if ($request_method = OPTIONS) {
add_header Access-Control-Allow-Origin $http_origin always;
add_header Access-Control-Allow-Credentials true always;
add_header Access-Control-Allow-Headers content-type,authorization always;
add_header Access-Control-Allow-Methods OPTIONS,GET,POST,PATCH,PUT,DELETE;
return 200;
}
add_header Access-Control-Allow-Origin $http_origin always;
add_header Access-Control-Allow-Credentials true always;
add_header Access-Control-Allow-Headers content-type,authorization always;
add_header Access-Control-Allow-Methods OPTIONS,GET,POST,PATCH,PUT,DELETE;
proxy_pass http://customer-service-staging:8065/;
}
2023-06-11 16:42:03 +00:00
location /price/ {
if ($request_method = OPTIONS) {
add_header Access-Control-Allow-Origin $http_origin always;
add_header Access-Control-Allow-Credentials true always;
add_header Access-Control-Allow-Headers content-type,authorization always;
add_header Access-Control-Allow-Methods OPTIONS,GET,POST,PATCH,PUT,DELETE;
return 200;
}
add_header Access-Control-Allow-Origin $http_origin always;
add_header Access-Control-Allow-Credentials true always;
add_header Access-Control-Allow-Headers content-type,authorization always;
add_header Access-Control-Allow-Methods OPTIONS,GET,POST,PATCH,PUT,DELETE;
proxy_pass http://10.6.0.11:8001/;
}
2023-05-07 11:52:43 +00:00
location /feedback/ {
2023-05-07 15:07:31 +00:00
if ($request_method = OPTIONS) {
add_header Access-Control-Allow-Origin $http_origin always;
add_header Access-Control-Allow-Credentials true always;
add_header Access-Control-Allow-Headers content-type always;
return 200;
}
2023-05-07 15:34:30 +00:00
add_header Access-Control-Allow-Origin $http_origin always;
add_header Access-Control-Allow-Credentials true always;
add_header Access-Control-Allow-Headers content-type always;
2023-05-07 11:52:43 +00:00
proxy_set_header Host $host;
proxy_pass http://10.6.0.31:8006/;
}
2023-07-18 22:03:12 +00:00
location /verification1 {
2023-07-07 09:26:55 +00:00
if ($request_method = OPTIONS) {
add_header Access-Control-Allow-Origin $http_origin always;
add_header Access-Control-Allow-Credentials true always;
2023-07-19 12:24:29 +00:00
add_header Access-Control-Allow-Headers content-type always;
add_header Access-Control-Allow-Methods GET;
2023-07-07 09:26:55 +00:00
return 200;
}
2023-07-03 12:08:47 +00:00
add_header Access-Control-Allow-Origin $http_origin always;
add_header Access-Control-Allow-Credentials true always;
2023-07-19 12:24:29 +00:00
add_header Access-Control-Allow-Headers content-type always;
add_header Access-Control-Allow-Methods GET;
2023-07-18 22:03:12 +00:00
chunked_transfer_encoding off;
proxy_buffering off;
proxy_cache off;
proxy_pass https://storage.yandexcloud.net;
}
location /verification/ {
if ($request_method = OPTIONS) {
add_header Access-Control-Allow-Origin $http_origin always;
add_header Access-Control-Allow-Credentials true always;
2023-07-19 12:24:29 +00:00
add_header Access-Control-Allow-Headers content-type,authorization always;
add_header Access-Control-Allow-Methods OPTIONS,GET,POST,PATCH,PUT,DELETE;
2023-07-18 22:03:12 +00:00
return 200;
}
add_header Access-Control-Allow-Origin $http_origin always;
add_header Access-Control-Allow-Credentials true always;
2023-07-19 12:24:29 +00:00
add_header Access-Control-Allow-Headers content-type,authorization always;
add_header Access-Control-Allow-Methods OPTIONS,GET,POST,PATCH,PUT,DELETE;
2023-07-03 12:08:47 +00:00
proxy_set_header Referer $host;
proxy_set_header Origin $http_origin;
proxy_set_header Connection '';
proxy_http_version 1.1;
chunked_transfer_encoding off;
proxy_buffering off;
proxy_cache off;
2023-07-05 01:25:28 +00:00
proxy_pass http://10.6.0.31:7035/;
2023-07-03 12:08:47 +00:00
}
2023-05-07 11:52:43 +00:00
2023-05-07 11:03:39 +00:00
location / {
if ($host = hub.pena.digital) {
proxy_pass http://hub;
}
if ($host = docs.pena.digital) {
proxy_pass http://docs;
2023-05-07 11:52:43 +00:00
}
if ($host = admin.pena.digital) {
2023-05-08 17:17:02 +00:00
proxy_pass http://admin_front;
2023-05-07 11:52:43 +00:00
}
if ($host = services.pena.digital) {
proxy_pass http://services;
}
if ($host = links.pena.digital) {
proxy_pass http://dwarfener;
}
if ($host = oauth.pena.digital) {
proxy_pass http://pena-social-auth-service:8000;
2023-07-01 16:09:00 +00:00
}
if ($host = squiz.pena.digital) {
proxy_pass http://squiz;
2023-05-07 11:03:39 +00:00
}
}
listen [::]:443 ssl ipv6only=on; # managed by Certbot
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/nginx/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/nginx/privkey.pem; # managed by Certbot
}
server {
listen 80 ;
listen [::]:80 ;
server_name _;
return 301 https://$host$request_uri;
}