matrix-docker-ansible-deploy icon indicating copy to clipboard operation
matrix-docker-ansible-deploy copied to clipboard

CORS error for matrix_element_admin_enabled:true

Open jandechent opened this issue 1 month ago • 0 comments

Describe the bug I added matrix_element_admin_enabled: true to use the element admin console. I can visit the login (https://admin.element.example.de/login) page, it renders correctly, but I get this:

Quellübergreifende (Cross-Origin) Anfrage blockiert: Die Gleiche-Quelle-Regel verbietet das Lesen der externen Ressource auf https://example.de/.well-known/matrix/client. (Grund: CORS-Kopfzeile 'Access-Control-Allow-Origin' fehlt). Statuscode: 302.
Quellübergreifende (Cross-Origin) Anfrage blockiert: Die Gleiche-Quelle-Regel verbietet das Lesen der externen Ressource auf https://examplede/.well-known/matrix/client. (Grund: CORS-Anfrage schlug fehl). Statuscode: (null).

To Reproduce

My vars.yml file looks like this:

matrix_authentication_service_enabled: true 
matrix_static_files_container_labels_base_domain_enabled: true 
matrix_element_admin_enabled: true 

My .htaccess on example.de

Redirect 302 /.well-known/matrix https://matrix.example.de/.well-known/matrix

Federation works and I can indeed get the files.

My DNS settings:

host typ target
admin.element.example.de CNAME matrix.example.de
element.example.de CNAME matrix.example.de
matrix.example.de A 1.2.3.4
matrix.example.de AAAA 1:2:3::1

Expected behavior

I do believe I followed the documentation to the point - I hope. So my expectation was this 'simply' work or that there is more documentation what to do.

Matrix Server:

  • OS: Debian 13
  • Architecture: amd 64

jandechent avatar Oct 15 '25 09:10 jandechent