1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/dont-code_ynh.git synced 2024-09-03 18:26:34 +02:00

Fixed cors header not set for data

This commit is contained in:
Gérard Collin 2024-05-25 11:26:44 +02:00
parent 46aa25da61
commit 3d8795f7be
2 changed files with 14 additions and 1 deletions

View file

@ -8,6 +8,7 @@ location __PATH__/ {
# Handling preflight requests
if ($request_method = OPTIONS) {
more_set_headers 'Access-Control-Allow-Methods: *' 'Access-Control-Allow-Headers: *';
return 200;
}
# Path to source
@ -37,6 +38,10 @@ location __PATH__/ {
}
location __PATH__/project {
if ($request_method = OPTIONS) {
more_set_headers 'Access-Control-Allow-Methods: *' 'Access-Control-Allow-Headers: *';
return 200;
}
proxy_pass http://localhost:__PORT_PROJECT__/project;
proxy_set_header Host $host;
proxy_read_timeout 86400s;
@ -44,6 +49,10 @@ location __PATH__/ {
}
location __PATH__/data {
if ($request_method = OPTIONS) {
more_set_headers 'Access-Control-Allow-Methods: *' 'Access-Control-Allow-Headers: *';
return 200;
}
proxy_pass http://localhost:__PORT_DATA__/data;
proxy_set_header Host $host;
proxy_read_timeout 86400s;
@ -51,6 +60,10 @@ location __PATH__/ {
}
location __PATH__/documents {
if ($request_method = OPTIONS) {
more_set_headers 'Access-Control-Allow-Methods: *' 'Access-Control-Allow-Headers: *';
return 200;
}
proxy_pass http://localhost:__PORT_DATA__/documents;
proxy_set_header Host $host;
proxy_read_timeout 86400s;

View file

@ -7,7 +7,7 @@ name = "Dont-code Services"
description.en = "Install services and databases needed to support Dont-code platform"
description.fr = "Installe les services et base de données nécessaires pour utiliser la plateforme Dont-code"
version = "0.3.2~ynh1"
version = "0.3.2~ynh2"
maintainers = ["Dont-code Team"]