]> git.immae.eu Git - perso/Immae/Config/Nix.git/commitdiff
Fix Shaarli rest API
authorIsmaël Bouya <ismael.bouya@normalesup.org>
Wed, 29 Sep 2021 22:27:40 +0000 (00:27 +0200)
committerIsmaël Bouya <ismael.bouya@normalesup.org>
Wed, 29 Sep 2021 22:37:47 +0000 (00:37 +0200)
modules/private/websites/tools/tools/shaarli.nix

index da8f734cb0b8082825a3587985f68948f2c09a85..d11f52517b5977b76d23247dfec2cc7dd56440fb 100644 (file)
@@ -22,6 +22,11 @@ in rec {
       Alias /Shaarli "${root}"
 
       Include /var/secrets/webapps/tools-shaarli
+      <Location /Shaarli>
+        Header set Access-Control-Allow-Origin "*"
+        Header set Access-Control-Allow-Methods "GET, POST, PUT, DELETE, OPTIONS"
+        Header set Access-Control-Allow-Headers "Origin, X-Requested-With, Content-Type, Accept, Authorization, Client-Security-Token, Accept-Encoding"
+      </Location>
       <Directory "${root}">
         DirectoryIndex index.php index.htm index.html
         Options Indexes FollowSymLinks MultiViews Includes