Closed arenekosreal closed 2 months ago
I have changed the code to check OPTIONS
in MakeHTTPAPI
, I must say the diff is much cleaner than the old one.
Attention: Patch coverage is 0%
with 4 lines
in your changes missing coverage. Please review.
Project coverage is 68.36%. Comparing base (
f2db7cb
) to head (29028d7
). Report is 3 commits behind head on main.
Files with missing lines | Patch % | Lines |
---|---|---|
internal/httputil/httpapi.go | 0.00% | 4 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
OPTIONS method is usually sent by browser in preflight requests, most of the time we cannot control preflight request to add auth header.
Synapse will return a 204 response directly without authentication for those OPTIONS method.
According to firefox's documentation, both 200 and 204 are acceptable so I think there is no need to change handler in dendrite.
This closes https://github.com/matrix-org/dendrite/issues/3424
No need to add a test because this is just a fix and I have tested on my Cinny Web client personally.
Pull Request Checklist
Signed-off-by:
arenekosreal <17194552+arenekosreal@users.noreply.github.com>