Merge pull request #56987 from bachp/nextcloud-ocm-provider

nixos/nextcloud: fix escapings and ocm-provider
This commit is contained in:
Silvan Mosberger 2019-03-08 16:49:36 +01:00 committed by GitHub
commit 21c6592a42
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -427,19 +427,19 @@ in {
priority = 210; priority = 210;
extraConfig = "return 301 $scheme://$host/remote.php/dav;"; extraConfig = "return 301 $scheme://$host/remote.php/dav;";
}; };
"~ ^/(?:build|tests|config|lib|3rdparty|templates|data)/" = { "~ ^\\/(?:build|tests|config|lib|3rdparty|templates|data)\\/" = {
priority = 300; priority = 300;
extraConfig = "deny all;"; extraConfig = "deny all;";
}; };
"~ ^/(?:\\.|autotest|occ|issue|indie|db_|console)" = { "~ ^\\/(?:\\.|autotest|occ|issue|indie|db_|console)" = {
priority = 300; priority = 300;
extraConfig = "deny all;"; extraConfig = "deny all;";
}; };
"~ ^/(?:index|remote|public|cron|core/ajax/update|status|ocs/v[12]|updater/.+|ocs-provider/.+)\\.php(?:$|/)" = { "~ ^\\/(?:index|remote|public|cron|core/ajax\\/update|status|ocs\\/v[12]|updater\\/.+|ocs-provider\\/.+|ocm-provider\\/.+)\\.php(?:$|\\/)" = {
priority = 500; priority = 500;
extraConfig = '' extraConfig = ''
include ${config.services.nginx.package}/conf/fastcgi.conf; include ${config.services.nginx.package}/conf/fastcgi.conf;
fastcgi_split_path_info ^(.+\.php)(/.*)$; fastcgi_split_path_info ^(.+\.php)(\\/.*)$;
fastcgi_param PATH_INFO $fastcgi_path_info; fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param HTTPS ${if cfg.https then "on" else "off"}; fastcgi_param HTTPS ${if cfg.https then "on" else "off"};
fastcgi_param modHeadersAvailable true; fastcgi_param modHeadersAvailable true;
@ -450,7 +450,7 @@ in {
fastcgi_read_timeout 120s; fastcgi_read_timeout 120s;
''; '';
}; };
"~ ^/(?:updater|ocs-provider|ocm-provider)(?:$|\/)".extraConfig = '' "~ ^\\/(?:updater|ocs-provider|ocm-provider)(?:$|\\/)".extraConfig = ''
try_files $uri/ =404; try_files $uri/ =404;
index index.php; index index.php;
''; '';