mirror of https://gitlab.crans.org/nounous/nixos
nextcloud: ajout CORS pour wiki
parent
760b14b795
commit
932e7ecc17
|
|
@ -52,4 +52,17 @@
|
|||
appstoreEnable = true;
|
||||
extraAppsEnable = true;
|
||||
};
|
||||
|
||||
# Activation CORS pour récuppérer les agendas depuis le wiki
|
||||
services.nginx.virtualHosts.${config.services.nextcloud.hostName}.locations."~* /remote.php/dav/public-calendars/[a-z]+\?export".extraConfig =
|
||||
''
|
||||
add_header 'Access-Control-Allow-Origin' 'https://mediawiki.crans.org' always;
|
||||
add_header 'Access-Control-Allow-Methods' 'GET, OPTIONS' always;
|
||||
if ($request_method = 'OPTIONS') {
|
||||
add_header 'Access-Control-Max-Age' 86400;
|
||||
add_header 'Content-Type' 'text/plain; charset=utf-8';
|
||||
add_header 'Content-Length' 0;
|
||||
return 204;
|
||||
}
|
||||
'';
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue