- Notifications
You must be signed in to change notification settings - Fork928
Description
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?