matrix-org / dendrite

Dendrite is a second-generation Matrix homeserver written in Go!
https://matrix-org.github.io/dendrite/
Apache License 2.0
5.67k stars 664 forks source link

CORS headers omitted for some endpoints #1776

Closed nashley closed 3 years ago

nashley commented 3 years ago

Background information

Description

Access-Control-Allow-Headers and Access-Control-Allow-Methods and Access-Control-Allow-Origin aren't specified for the following endpoints:

Steps to reproduce

I'd expect the appropriate CORS headers to be returned for these endpoints like they are for the others. If that's not desired for some reason, I'd expect a documented explanation.

neilalexander commented 3 years ago

These endpoints aren't implemented yet. That's why there are no CORS headers returned for them.

nashley commented 3 years ago

Ah, I thought that might be the case. Would it be useful if I submitted a PR to stub them out and return a ~501~ ~405~ 404 with the standard CORS headers?

neilalexander commented 3 years ago

I'm not sure if a 404 with CORS headers is any better than a 404 without CORS headers?

@Kegsay Any thoughts?

kegsay commented 3 years ago

Please do not attach CORS headers for these endpoints. We have no plans to implement some of them.