Thanks to visit codestin.com
Credit goes to github.com

Skip to content

CORS is not permitted between multiple subdomain workspace apps  #5706

Closed
@palmmymumu

Description

@palmmymumu

I'm using coder with caddy to dev my backend project but when using forwarded port api url with XMLHttpRequest (Vue axios) it occurs error

Access to XMLHttpRequest at 'https://8001--dev--xxx--xxx.coder.xxx.com/admin/report?start=2023-01-13&end=2023-01-13' from origin 'https://3000--dev--xxx--xxx.coder.xxx.com' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: Redirect is not allowed for a preflight request.

I saw in chrome dev tools when frontend trying to get preflight request (options request) to that path, it returned http code 307 with redirection to "https://coder.xxx.com/api/v2/applications/auth-redirect?redirect_uri=https%3A%2F%2F8001--xxx--xxx--xxx.coder.xxx.com%2Fadmin%2Freport%3Fstart%3D2023-01-13%26end%3D2023-01-13"

Which CORS policy doesn't allow. What should I do?

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