8000 Handle case where application sends conflicting CORS headers · Issue #8010 · coder/coder · GitHub
[go: up one dir, main page]

Skip to content
Handle case where application sends conflicting CORS headers #8010
Closed
@code-asher

Description

@code-asher

It seems if an application sends its own headers they actually get appended (I mistakenly thought they would get overwritten but I think this was confusion from back when I was testing a different method of setting the headers rather than using the middleware).

This is an issue with the allowed origin header because although from what I can tell this is technically valid most browsers refuse to work when you set this header multiple times even if they have the same value.

We can either strip the headers from the application or remove ours in favor of the application's but since applications cannot handle OPTIONS anyway to be consistent I think we should prefer ours. This was actually the original plan anyway but I (foolishly) abandoned it because we were using the middleware. Hopefully there is a way to do this and still use the middleware though.

We will also need to update the documentation.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0