CORS policy problem: Redirect is not allowed for a preflight request. #3547

Closed
opened 2026-02-21 17:59:08 -05:00 by yindo · 0 comments
Owner

Originally created by @Caco355 on GitHub (May 22, 2024).

Self Checks

  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • Please do not modify this template :) and fill in all the required fields.

Dify version

0.6.8

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

I write an html page that calls the api. The web page has a chat window and no answer shows up after I send a question.
The console show :

Access to fetch at 'http://xxxxx/v1' from origin 'null' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: Redirect is not allowed for a preflight request.

Prerequisites:
I have already configured in the dify-api container environment. The configuration is defult.

CONSOLE_CORS_ALLOW_ORIGINS: '*'
WEB_API_CORS_ALLOW_ORIGINS: '*'

✔️ Expected Behavior

No response

Actual Behavior

274655160d953d78698342ed6e2d4b9

Originally created by @Caco355 on GitHub (May 22, 2024). ### Self Checks - [X] This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general). - [X] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [X] I confirm that I am using English to submit this report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). - [X] Please do not modify this template :) and fill in all the required fields. ### Dify version 0.6.8 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce I write an html page that calls the api. The web page has a chat window and no answer shows up after I send a question. The console show : > Access to fetch at 'http://xxxxx/v1' from origin 'null' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: Redirect is not allowed for a preflight request. Prerequisites: I have already configured in the dify-api container environment. The configuration is defult. ``` CONSOLE_CORS_ALLOW_ORIGINS: '*' WEB_API_CORS_ALLOW_ORIGINS: '*' ``` ### ✔️ Expected Behavior _No response_ ### ❌ Actual Behavior ![274655160d953d78698342ed6e2d4b9](https://github.com/langgenius/dify/assets/66667633/79ef41ed-e904-42e4-9701-157404ecdbf8)
yindo added the 🐞 bug label 2026-02-21 17:59:08 -05:00
yindo closed this issue 2026-02-21 17:59:08 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#3547