Matrix Docker Ansible eploy
Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
 
 

148 righe
5.1 KiB

  1. matrix.DOMAIN.tld {
  2. @identity {
  3. path /_matrix/identity/*
  4. }
  5. @noidentity {
  6. not path /_matrix/identity/*
  7. }
  8. @search {
  9. path /_matrix/client/r0/user_directory/search/*
  10. }
  11. @nosearch {
  12. not path /_matrix/client/r0/user_directory/search/*
  13. }
  14. @static {
  15. path /matrix/static-files/*
  16. }
  17. @nostatic {
  18. not path /matrix/static-files/*
  19. }
  20. header {
  21. # Enable HTTP Strict Transport Security (HSTS) to force clients to always connect via HTTPS
  22. Strict-Transport-Security "max-age=31536000; includeSubDomains; preload"
  23. # Enable cross-site filter (XSS) and tell browser to block detected attacks
  24. X-XSS-Protection "1; mode=block"
  25. # Prevent some browsers from MIME-sniffing a response away from the declared Content-Type
  26. X-Content-Type-Options "nosniff"
  27. # Disallow the site to be rendered within a frame (clickjacking protection)
  28. X-Frame-Options "DENY"
  29. # X-Robots-Tag
  30. X-Robots-Tag "noindex, noarchive, nofollow"
  31. 167,9 79%
  32. }
  33. # Cache
  34. header @static {
  35. # Cache
  36. Cache-Control "public, max-age=31536000"
  37. defer
  38. }
  39. # identity
  40. handle @identity {
  41. reverse_proxy localhost:8090 {
  42. header_up X-Forwarded-Port {http.request.port}
  43. header_up X-Forwarded-Proto {http.request.scheme}
  44. header_up X-Forwarded-TlsProto {tls_protocol}
  45. header_up X-Forwarded-TlsCipher {tls_cipher}
  46. header_up X-Forwarded-HttpsProto {proto}
  47. }
  48. }
  49. # search
  50. handle @search {
  51. reverse_proxy localhost:8090 {
  52. header_up X-Forwarded-Port {http.request.port}
  53. header_up X-Forwarded-Proto {http.request.scheme}
  54. header_up X-Forwarded-TlsProto {tls_protocol}
  55. header_up X-Forwarded-TlsCipher {tls_cipher}
  56. header_up X-Forwarded-HttpsProto {proto}
  57. }
  58. }
  59. handle {
  60. encode zstd gzip
  61. reverse_proxy localhost:8008 {
  62. header_up X-Forwarded-Port {http.request.port}
  63. header_up X-Forwarded-Proto {http.request.scheme}
  64. header_up X-Forwarded-TlsProto {tls_protocol}
  65. header_up X-Forwarded-TlsCipher {tls_cipher}
  66. header_up X-Forwarded-HttpsProto {proto}
  67. }
  68. }
  69. }
  70. matrix.DOMAIN.tld:8448 {
  71. handle {
  72. encode zstd gzip
  73. reverse_proxy 127.0.0.1:8048 {
  74. header_up X-Forwarded-Port {http.request.port}
  75. header_up X-Forwarded-Proto {http.request.scheme}
  76. header_up X-Forwarded-TlsProto {tls_protocol}
  77. header_up X-Forwarded-TlsCipher {tls_cipher}
  78. header_up X-Forwarded-HttpsProto {proto}
  79. }
  80. }
  81. }
  82. dimension.DOMAIN.tld {
  83. header {
  84. # Enable HTTP Strict Transport Security (HSTS) to force clients to always connect via HTTPS
  85. Strict-Transport-Security "max-age=31536000; includeSubDomains; preload"
  86. # Enable cross-site filter (XSS) and tell browser to block detected attacks
  87. X-XSS-Protection "1; mode=block"
  88. # Prevent some browsers from MIME-sniffing a response away from the declared Content-Type
  89. X-Content-Type-Options "nosniff"
  90. # Disallow the site to be rendered within a frame (clickjacking protection)
  91. X-Frame-Options "DENY"
  92. # X-Robots-Tag
  93. X-Robots-Tag "noindex, noarchive, nofollow"
  94. }
  95. handle {
  96. encode zstd gzip
  97. reverse_proxy localhost:8184 {
  98. header_up X-Forwarded-Port {http.request.port}
  99. header_up X-Forwarded-Proto {http.request.scheme}
  100. header_up X-Forwarded-TlsProto {tls_protocol}
  101. header_up X-Forwarded-TlsCipher {tls_cipher}
  102. header_up X-Forwarded-HttpsProto {proto}
  103. }
  104. }
  105. }
  106. element.DOMAIN.tld {
  107. header {
  108. # Enable HTTP Strict Transport Security (HSTS) to force clients to always connect via HTTPS
  109. Strict-Transport-Security "max-age=31536000; includeSubDomains; preload"
  110. # Enable cross-site filter (XSS) and tell browser to block detected attacks
  111. X-XSS-Protection "1; mode=block"
  112. # Prevent some browsers from MIME-sniffing a response away from the declared Content-Type
  113. X-Content-Type-Options "nosniff"
  114. # Disallow the site to be rendered within a frame (clickjacking protection)
  115. X-Frame-Options "DENY"
  116. # X-Robots-Tag
  117. X-Robots-Tag "noindex, noarchive, nofollow"
  118. }
  119. handle {
  120. encode zstd gzip
  121. reverse_proxy localhost:8765 {
  122. header_up X-Forwarded-Port {http.request.port}
  123. header_up X-Forwarded-Proto {http.request.scheme}
  124. header_up X-Forwarded-TlsProto {tls_protocol}
  125. header_up X-Forwarded-TlsCipher {tls_cipher}
  126. header_up X-Forwarded-HttpsProto {proto}
  127. }
  128. }