mirror of
https://github.com/element-hq/ess-helm.git
synced 2026-12-04 15:52:31 -08:00
Merge pull request #1452 from ad35cm/well-known-headers
This commit is contained in:
6 files changed
+46
-11
No files matched your search
@@ -1,6 +1,6 @@
|
||||
{{- /*
|
||||
Copyright 2024-2025 New Vector Ltd
|
||||
Copyright 2025 Element Creations Ltd
|
||||
Copyright 2025-2026 Element Creations Ltd
|
||||
|
||||
SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/ -}}
|
||||
@@ -47,15 +47,9 @@ frontend well-known-in
|
||||
backend well-known-static
|
||||
mode http
|
||||
|
||||
http-after-response set-header X-Frame-Options SAMEORIGIN
|
||||
http-after-response set-header X-Content-Type-Options nosniff
|
||||
http-after-response set-header X-XSS-Protection "1; mode=block"
|
||||
http-after-response set-header Content-Security-Policy "frame-ancestors 'self'"
|
||||
http-after-response set-header X-Robots-Tag "noindex, nofollow, noarchive, noimageindex"
|
||||
|
||||
http-after-response set-header Access-Control-Allow-Origin *
|
||||
http-after-response set-header Access-Control-Allow-Methods "GET, POST, PUT, DELETE, OPTIONS"
|
||||
http-after-response set-header Access-Control-Allow-Headers "X-Requested-With, Content-Type, Authorization"
|
||||
{{- range $name, $value := .headers }}
|
||||
http-after-response set-header {{ $name }} {{ $value | quote }}
|
||||
{{- end }}
|
||||
|
||||
http-request return status 200 content-type "application/json" file "/well-known/server" if { path /.well-known/matrix/server }
|
||||
http-request return status 200 content-type "application/json" file "/well-known/client" if { path /.well-known/matrix/client }
|
||||
|
||||
@@ -36,6 +36,12 @@
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"headers": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
{#
|
||||
Copyright 2024-2025 New Vector Ltd
|
||||
Copyright 2025 Element Creations Ltd
|
||||
Copyright 2025-2026 Element Creations Ltd
|
||||
|
||||
SPDX-License-Identifier: AGPL-3.0-only
|
||||
#}
|
||||
@@ -24,3 +24,17 @@ additional:
|
||||
client: "{}"
|
||||
server: "{}"
|
||||
support: "{}"
|
||||
|
||||
## Headers to return on the /.well-known/matrix/* responses
|
||||
## Additional headers can be added and the default headers can be
|
||||
## modified or removed (by setting their value to null)
|
||||
headers:
|
||||
Access-Control-Allow-Headers: "X-Requested-With, Content-Type, Authorization"
|
||||
Access-Control-Allow-Methods: "GET, POST, PUT, DELETE, OPTIONS"
|
||||
Access-Control-Allow-Origin: "*"
|
||||
Cache-Control: "public, max-age=3600"
|
||||
Content-Security-Policy: "frame-ancestors 'self'"
|
||||
X-Content-Type-Options: "nosniff"
|
||||
X-Frame-Options: "SAMEORIGIN"
|
||||
X-Robots-Tag: "noindex, nofollow, noarchive, noimageindex"
|
||||
X-XSS-Protection: "1; mode=block"
|
||||
@@ -27283,6 +27283,12 @@
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"headers": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
|
||||
@@ -5709,3 +5709,17 @@ wellKnownDelegation:
|
||||
client: "{}"
|
||||
server: "{}"
|
||||
support: "{}"
|
||||
|
||||
## Headers to return on the /.well-known/matrix/* responses
|
||||
## Additional headers can be added and the default headers can be
|
||||
## modified or removed (by setting their value to null)
|
||||
headers:
|
||||
Access-Control-Allow-Headers: "X-Requested-With, Content-Type, Authorization"
|
||||
Access-Control-Allow-Methods: "GET, POST, PUT, DELETE, OPTIONS"
|
||||
Access-Control-Allow-Origin: "*"
|
||||
Cache-Control: "public, max-age=3600"
|
||||
Content-Security-Policy: "frame-ancestors 'self'"
|
||||
X-Content-Type-Options: "nosniff"
|
||||
X-Frame-Options: "SAMEORIGIN"
|
||||
X-Robots-Tag: "noindex, nofollow, noarchive, noimageindex"
|
||||
X-XSS-Protection: "1; mode=block"
|
||||
@@ -0,0 +1 @@
|
||||
Allow customising the response headers of the `/.well-known/matrix/*` endpoints via `wellKnownDelegation.headers`. The well-known responses now return `Cache-Control: public, max-age=3600` by default.
|
||||
Reference in new issue
Block a user