Matrix Docker Ansible eploy
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.
 
 

126 lines
3.6 KiB

  1. matrix.DOMAIN.tld {
  2. tls {$CADDY_TLS}
  3. @identity {
  4. path /_matrix/identity/*
  5. }
  6. @noidentity {
  7. not path /_matrix/identity/*
  8. }
  9. @search {
  10. path /_matrix/client/r0/user_directory/search/*
  11. }
  12. @nosearch {
  13. not path /_matrix/client/r0/user_directory/search/*
  14. }
  15. @static {
  16. path /matrix/static-files/*
  17. }
  18. @nostatic {
  19. not path /matrix/static-files/*
  20. }
  21. header {
  22. Access-Control-Allow-Origin *
  23. Strict-Transport-Security "mag=age=31536000;"
  24. X-Frame-Options "DENY"
  25. 167,9 79%
  26. Strict-Transport-Security "mag=age=31536000;"
  27. X-Frame-Options "DENY"
  28. X-XSS-Protection "1; mode=block"
  29. }
  30. # Cache
  31. header @static {
  32. # Cache
  33. Cache-Control "public, max-age=31536000"
  34. defer
  35. }
  36. # identity
  37. handle @identity {
  38. reverse_proxy localhost:8090/_matrix/identity {
  39. header_up X-Forwarded-Port {http.request.port}
  40. header_up X-Forwarded-Proto {http.request.scheme}
  41. header_up X-Forwarded-TlsProto {tls_protocol}
  42. header_up X-Forwarded-TlsCipher {tls_cipher}
  43. header_up X-Forwarded-HttpsProto {proto}
  44. }
  45. }
  46. # search
  47. handle @search {
  48. reverse_proxy localhost:8090/_matrix/client/r0/user_directory/search {
  49. header_up X-Forwarded-Port {http.request.port}
  50. header_up X-Forwarded-Proto {http.request.scheme}
  51. header_up X-Forwarded-TlsProto {tls_protocol}
  52. header_up X-Forwarded-TlsCipher {tls_cipher}
  53. header_up X-Forwarded-HttpsProto {proto}
  54. }
  55. }
  56. handle {
  57. encode zstd gzip
  58. reverse_proxy localhost:8008 {
  59. header_up X-Forwarded-Port {http.request.port}
  60. header_up X-Forwarded-Proto {http.request.scheme}
  61. header_up X-Forwarded-TlsProto {tls_protocol}
  62. header_up X-Forwarded-TlsCipher {tls_cipher}
  63. header_up X-Forwarded-HttpsProto {proto}
  64. }
  65. }
  66. }
  67. :8448 {
  68. handle {
  69. encode zstd gzip
  70. reverse_proxy localhost:8448 {
  71. header_up X-Forwarded-Port {http.request.port}
  72. header_up X-Forwarded-Proto {http.request.scheme}
  73. header_up X-Forwarded-TlsProto {tls_protocol}
  74. header_up X-Forwarded-TlsCipher {tls_cipher}
  75. header_up X-Forwarded-HttpsProto {proto}
  76. }
  77. }
  78. }
  79. dimension.DOMAIN.tld {
  80. tls {$CADDY_TLS}
  81. handle {
  82. encode zstd gzip
  83. reverse_proxy localhost:8184 {
  84. header_up X-Forwarded-Port {http.request.port}
  85. header_up X-Forwarded-Proto {http.request.scheme}
  86. header_up X-Forwarded-TlsProto {tls_protocol}
  87. header_up X-Forwarded-TlsCipher {tls_cipher}
  88. header_up X-Forwarded-HttpsProto {proto}
  89. }
  90. }
  91. }
  92. element.DOMAIN.tld {
  93. tls {$CADDY_TLS}
  94. handle {
  95. encode zstd gzip
  96. reverse_proxy localhost:8765 {
  97. header_up X-Forwarded-Port {http.request.port}
  98. header_up X-Forwarded-Proto {http.request.scheme}
  99. header_up X-Forwarded-TlsProto {tls_protocol}
  100. header_up X-Forwarded-TlsCipher {tls_cipher}
  101. header_up X-Forwarded-HttpsProto {proto}
  102. }
  103. }