Guest User

Untitled

a guest
Jul 25th, 2020
67
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <IfModule mod_headers.c>
  2. <IfModule mod_setenvif.c>
  3. <IfModule mod_fcgid.c>
  4. # SetEnvIfNoCase ^Authorization$ "(.+)" XAUTHORIZATION=$1
  5. RequestHeader set XAuthorization %{XAUTHORIZATION}e env=XAUTHORIZATION
  6. </IfModule>
  7. <IfModule mod_proxy_fcgi.c>
  8. # SetEnvIfNoCase Authorization "(.+)" HTTP_AUTHORIZATION=$1
  9. </IfModule>
  10. </IfModule>
  11.  
  12. <IfModule mod_env.c>
  13. # Add security and privacy related headers
  14.  
  15. # Avoid doubled headers by unsetting headers in "onsuccess" table,
  16. # then add headers to "always" table: https://github.com/nextcloud/server/pull/19002
  17. Header onsuccess unset Referrer-Policy
  18. Header always set Referrer-Policy "no-referrer"
  19.  
  20. Header onsuccess unset X-Content-Type-Options
  21. Header always set X-Content-Type-Options "nosniff"
  22.  
  23. Header onsuccess unset X-Download-Options
  24. Header always set X-Download-Options "noopen"
  25.  
  26. Header onsuccess unset X-Frame-Options
  27. Header always set X-Frame-Options "SAMEORIGIN"
  28.  
  29. Header onsuccess unset X-Permitted-Cross-Domain-Policies
  30. Header always set X-Permitted-Cross-Domain-Policies "none"
  31.  
  32. Header onsuccess unset X-Robots-Tag
  33. Header always set X-Robots-Tag "none"
  34.  
  35. Header onsuccess unset X-XSS-Protection
  36. Header always set X-XSS-Protection "1; mode=block"
  37.  
  38. # SetEnv modHeadersAvailable true
  39. </IfModule>
  40.  
  41. # Add cache control for static resources
  42. <FilesMatch "\.(css|js|svg|gif)$">
  43. Header set Cache-Control "max-age=15778463"
  44. </FilesMatch>
  45.  
  46. # Let browsers cache WOFF files for a week
  47. <FilesMatch "\.woff2?$">
  48. Header set Cache-Control "max-age=604800"
  49. </FilesMatch>
  50. </IfModule>
  51. <IfModule mod_php7.c>
  52. # php_value mbstring.func_overload 0
  53. # php_value default_charset 'UTF-8'
  54. # php_value output_buffering 0
  55. <IfModule mod_env.c>
  56. # SetEnv htaccessWorking true
  57. </IfModule>
  58. </IfModule>
  59. <IfModule mod_rewrite.c>
  60. RewriteEngine on
  61. RewriteCond %{HTTP_USER_AGENT} DavClnt
  62. RewriteRule ^$ /remote.php/webdav/ [L,R=302]
  63. RewriteRule .* - [env=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
  64. RewriteRule ^\.well-known/host-meta /public.php?service=host-meta [QSA,L]
  65. RewriteRule ^\.well-known/host-meta\.json /public.php?service=host-meta-json [QSA,L]
  66. RewriteRule ^\.well-known/webfinger /public.php?service=webfinger [QSA,L]
  67. RewriteRule ^\.well-known/nodeinfo /public.php?service=nodeinfo [QSA,L]
  68. RewriteRule ^\.well-known/carddav /remote.php/dav/ [R=301,L]
  69. RewriteRule ^\.well-known/caldav /remote.php/dav/ [R=301,L]
  70. RewriteRule ^remote/(.*) remote.php [QSA,L]
  71. RewriteRule ^(?:build|tests|config|lib|3rdparty|templates)/.* - [R=404,L]
  72. RewriteCond %{REQUEST_URI} !^/\.well-known/(acme-challenge|pki-validation)/.*
  73. RewriteRule ^(?:\.|autotest|occ|issue|indie|db_|console).* - [R=404,L]
  74. </IfModule>
  75. <IfModule mod_mime.c>
  76. AddType image/svg+xml svg svgz
  77. AddEncoding gzip svgz
  78. </IfModule>
  79. <IfModule mod_dir.c>
  80. DirectoryIndex index.php index.html
  81. </IfModule>
  82. AddDefaultCharset utf-8
  83. # Options -Indexes
  84. <IfModule pagespeed_module>
  85. ModPagespeed Off
  86. </IfModule>
  87. #### DO NOT CHANGE ANYTHING ABOVE THIS LINE ####
  88.  
  89. ErrorDocument 403 //
  90. ErrorDocument 404 //
  91.  
RAW Paste Data