You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

46 lines
1.8 KiB

  1. your.domain.tld {
  2. # You need to change:
  3. # Your domain/subdomain
  4. # The unix php socket used to match the one of your system
  5. # The port you set for movim under /ws/*
  6. # The root directory where movim is installed <path-to>
  7. # Remember the installation guide on the wiki, the caddy user should have read and write acces to the files under /public and must have exectue permissions for the daemon running chown -R caddy:caddy movim should fix any issue
  8. # Feel free to delete all comments
  9. encode zstd gzip
  10. @static path /stickers/* /cache/* /theme/* /scripts/*.js #No need to use a @name matcher but is a bit more organized
  11. handle @static {
  12. root * /path-to/movim/public
  13. file_server
  14. }
  15. handle {
  16. rewrite * /index.php?{query}
  17. reverse_proxy unix//run/php/php-fpm.sock {
  18. transport fastcgi {
  19. env SCRIPT_FILENAME /path-to/movim/public/index.php
  20. }
  21. }
  22. }
  23. handle /ws/* {
  24. # This part of the configuration is generated when launching the daemon in the console output
  25. }
  26. #Security options you can ignore or delete
  27. header Strict-Transport-Security "max-age=31536000; includeSubDomains; preload"
  28. header X-XSS-Protection "1; mode=block"
  29. header X-Content-Type-Options "nosniff"
  30. header X-Frame-Options "DENY"
  31. header -Server
  32. header / {
  33. Content-Security-Policy = "upgrade-insecure-requests; default-src 'self'; style-src 'self'; script-src 'self'; img-src 'self'; object-src 'self'; worker-src 'self'; manifest-src 'self';"
  34. Referrer-Policy = "strict-origin-when-cross-origin"
  35. Permissions-Policy = "fullscreen=(self)"
  36. cache-control = "max-age=0,no-cache,no-store,must-revalidate" # This disables caching may want to deactivate
  37. X-Robots-Tag "noindex, nofollow, noarchive, nosnippet, notranslate, noimageindex" # Should work against indexing engines like google for more privacy
  38. }
  39. }