Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When api v1 is diabled, CORS Headers are missing. #94

Open
4censord opened this issue May 21, 2021 · 1 comment
Open

When api v1 is diabled, CORS Headers are missing. #94

4censord opened this issue May 21, 2021 · 1 comment

Comments

@4censord
Copy link

When api v1 is disabled, ma1sd responds with HTTP/2 405 to any request to v1 endpoints.

Config snippet
matrix:
  v1: false
  v2: true
api/v1
$ curl -i ma1sd.tld/_matrix/identity/v1
HTTP/2 405 
content-length: 0
date: Fri, 21 May 2021 11:14:17 GMT
strict-transport-security: max-age=16000000;

with api/v2

$ curl -i ma1sd.tld/_matrix/identity/v2
HTTP/2 200 
access-control-allow-origin: *
access-control-allow-headers: Origin, X-Requested-With, Content-Type, Accept, Authorization
content-type: application/json
content-length: 2
access-control-allow-methods: GET, POST, PUT, DELETE, OPTIONS
date: Fri, 21 May 2021 11:14:15 GMT
strict-transport-security: max-age=16000000;

{}

Due to the missing CORS Header Element web shows an error:
image

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at ma1sd.tld/_matrix/identity/api/v1. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing).

Im not sure if element web should be trying to reach api v1, but its failing nontheless.

@4censord 4censord changed the title When api v1 is diable, CORS Headers are missing. When api v1 is diabled, CORS Headers are missing. May 21, 2021
Craeckie pushed a commit to Craeckie/ma1sd that referenced this issue Dec 12, 2022
…id-sendgrid-java-4.9.3

Bump sendgrid-java from 4.9.1 to 4.9.3
@4censord
Copy link
Author

Just ran into this again with a new deployment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant