138 lines
4.4 KiB
Plaintext
138 lines
4.4 KiB
Plaintext
upstream SettingsServerStudio {
|
|
server monitoring-server.os-framework;
|
|
}
|
|
|
|
upstream StudioServer {
|
|
server studio-server.studioserver-shared:8080;
|
|
}
|
|
|
|
server {
|
|
listen 80;
|
|
gzip off;
|
|
gzip_disable "msie6";
|
|
gzip_min_length 1k;
|
|
gzip_buffers 16 64k;
|
|
gzip_http_version 1.1;
|
|
gzip_comp_level 6;
|
|
gzip_types *;
|
|
root /app;
|
|
|
|
location / {
|
|
try_files $uri $uri/index.html /index.html;
|
|
add_header Cache-Control "private,no-cache";
|
|
add_header Last-Modified "Oct, 03 Jan 2022 13:46:41 GMT";
|
|
expires 0;
|
|
}
|
|
|
|
location /api/command {
|
|
proxy_pass http://StudioServer;
|
|
proxy_set_header Host $http_host;
|
|
proxy_set_header X-real-ip $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection $http_connection;
|
|
proxy_set_header Accept-Encoding gzip;
|
|
proxy_read_timeout 180;
|
|
}
|
|
location /api/apps {
|
|
proxy_pass http://StudioServer;
|
|
proxy_set_header Host $http_host;
|
|
proxy_set_header X-real-ip $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection $http_connection;
|
|
proxy_set_header Accept-Encoding gzip;
|
|
proxy_read_timeout 180;
|
|
}
|
|
location /api/app-cfg {
|
|
proxy_pass http://StudioServer;
|
|
proxy_set_header Host $http_host;
|
|
proxy_set_header X-real-ip $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection $http_connection;
|
|
proxy_set_header Accept-Encoding gzip;
|
|
proxy_read_timeout 180;
|
|
}
|
|
location /api/app-state {
|
|
proxy_pass http://StudioServer;
|
|
proxy_set_header Host $http_host;
|
|
proxy_set_header X-real-ip $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection $http_connection;
|
|
proxy_set_header Accept-Encoding gzip;
|
|
proxy_read_timeout 180;
|
|
}
|
|
location /api/app-status {
|
|
proxy_pass http://StudioServer;
|
|
proxy_set_header Host $http_host;
|
|
proxy_set_header X-real-ip $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection $http_connection;
|
|
proxy_set_header Accept-Encoding gzip;
|
|
proxy_read_timeout 180;
|
|
}
|
|
location /api/list-my-containers {
|
|
proxy_pass http://StudioServer;
|
|
proxy_set_header Host $http_host;
|
|
proxy_set_header X-real-ip $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection $http_connection;
|
|
proxy_set_header Accept-Encoding gzip;
|
|
proxy_read_timeout 180;
|
|
}
|
|
location /api/files {
|
|
proxy_pass http://StudioServer;
|
|
proxy_set_header Host $http_host;
|
|
proxy_set_header X-real-ip $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection $http_connection;
|
|
proxy_set_header Accept-Encoding gzip;
|
|
proxy_read_timeout 180;
|
|
}
|
|
|
|
location /kapis {
|
|
proxy_pass http://SettingsServerStudio;
|
|
}
|
|
|
|
|
|
location /api {
|
|
proxy_pass http://SettingsServerStudio;
|
|
}
|
|
|
|
location /capi {
|
|
proxy_pass http://SettingsServerStudio;
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-real-ip $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
}
|
|
|
|
|
|
location ~ /(kapis/terminal|api/v1/watch|apis/apps/v1/watch) {
|
|
proxy_pass http://SettingsServerStudio;
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection "Upgrade";
|
|
proxy_set_header Host $host;
|
|
}
|
|
|
|
|
|
location = /js/script.js {
|
|
add_header Access-Control-Allow-Origin "*";
|
|
}
|
|
|
|
location ~.*\.(js|css|png|jpg|svg|woff|woff2)$ {
|
|
add_header Cache-Control "public, max-age=2678400";
|
|
}
|
|
} |