2022-12-27 17:59:56 +01:00
|
|
|
#sub_path_only rewrite ^__PATH__$ __PATH__/ permanent;
|
2022-12-29 10:06:04 +01:00
|
|
|
|
2022-12-27 17:59:56 +01:00
|
|
|
location __PATH__/ {
|
2023-01-03 14:51:52 +01:00
|
|
|
|
2024-04-05 18:33:54 +02:00
|
|
|
# CORS support
|
2024-04-11 12:07:49 +02:00
|
|
|
more_set_headers 'Access-Control-Allow-Origin: *';
|
2024-04-05 18:33:54 +02:00
|
|
|
|
|
|
|
# Handling preflight requests
|
|
|
|
if ($request_method = OPTIONS) {
|
2024-04-11 12:07:49 +02:00
|
|
|
more_set_headers 'Access-Control-Allow-Methods: *' 'Access-Control-Allow-Headers: *';
|
2024-05-25 11:26:44 +02:00
|
|
|
return 200;
|
2024-04-05 18:33:54 +02:00
|
|
|
}
|
|
|
|
|
2023-01-03 14:51:52 +01:00
|
|
|
# Path to source
|
2024-01-04 15:31:15 +01:00
|
|
|
alias __DATA_DIR__/;
|
2023-01-03 14:51:52 +01:00
|
|
|
|
|
|
|
index index.html;
|
|
|
|
|
2022-12-29 10:06:04 +01:00
|
|
|
location __PATH__/ide {
|
|
|
|
proxy_pass http://localhost:__PORT_IDE__/ide;
|
|
|
|
proxy_http_version 1.1;
|
|
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
|
|
proxy_set_header Connection "Upgrade";
|
|
|
|
proxy_set_header Host $host;
|
|
|
|
proxy_read_timeout 86400s;
|
|
|
|
proxy_send_timeout 86400s;
|
|
|
|
}
|
2022-12-27 17:59:56 +01:00
|
|
|
|
2022-12-29 10:06:04 +01:00
|
|
|
location __PATH__/preview {
|
|
|
|
proxy_pass http://localhost:__PORT_PREVIEW__/preview;
|
|
|
|
proxy_http_version 1.1;
|
|
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
|
|
proxy_set_header Connection "Upgrade";
|
|
|
|
proxy_set_header Host $host;
|
|
|
|
proxy_read_timeout 86400s;
|
|
|
|
proxy_send_timeout 86400s;
|
2022-12-27 17:59:56 +01:00
|
|
|
|
2022-12-29 10:06:04 +01:00
|
|
|
}
|
2022-12-27 17:59:56 +01:00
|
|
|
|
2022-12-29 10:06:04 +01:00
|
|
|
location __PATH__/project {
|
2024-05-25 11:26:44 +02:00
|
|
|
if ($request_method = OPTIONS) {
|
|
|
|
more_set_headers 'Access-Control-Allow-Methods: *' 'Access-Control-Allow-Headers: *';
|
|
|
|
return 200;
|
|
|
|
}
|
2022-12-29 10:06:04 +01:00
|
|
|
proxy_pass http://localhost:__PORT_PROJECT__/project;
|
|
|
|
proxy_set_header Host $host;
|
|
|
|
proxy_read_timeout 86400s;
|
|
|
|
proxy_send_timeout 86400s;
|
|
|
|
}
|
2022-12-27 17:59:56 +01:00
|
|
|
|
2022-12-29 10:06:04 +01:00
|
|
|
location __PATH__/data {
|
2024-05-25 11:26:44 +02:00
|
|
|
if ($request_method = OPTIONS) {
|
|
|
|
more_set_headers 'Access-Control-Allow-Methods: *' 'Access-Control-Allow-Headers: *';
|
|
|
|
return 200;
|
|
|
|
}
|
2022-12-29 10:06:04 +01:00
|
|
|
proxy_pass http://localhost:__PORT_DATA__/data;
|
|
|
|
proxy_set_header Host $host;
|
|
|
|
proxy_read_timeout 86400s;
|
|
|
|
proxy_send_timeout 86400s;
|
|
|
|
}
|
2022-12-27 17:59:56 +01:00
|
|
|
|
2022-12-29 10:06:04 +01:00
|
|
|
location __PATH__/documents {
|
2024-05-25 11:26:44 +02:00
|
|
|
if ($request_method = OPTIONS) {
|
|
|
|
more_set_headers 'Access-Control-Allow-Methods: *' 'Access-Control-Allow-Headers: *';
|
|
|
|
return 200;
|
|
|
|
}
|
2022-12-29 10:06:04 +01:00
|
|
|
proxy_pass http://localhost:__PORT_DATA__/documents;
|
|
|
|
proxy_set_header Host $host;
|
|
|
|
proxy_read_timeout 86400s;
|
|
|
|
proxy_send_timeout 86400s;
|
|
|
|
client_max_body_size 15M;
|
|
|
|
}
|
2022-12-27 17:59:56 +01:00
|
|
|
|
|
|
|
}
|