Reproducible CORS policy issue. #2412

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

Originally created by @mwnu on GitHub (Apr 21, 2024).

Self Checks

  • This is only for bug report, if you would like to ask a quesion, 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).
  • Pleas do not modify this template :) and fill in all the required fields.

Dify version

0.6.3

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

  1. In the application log, open one of the conversation logs.
  2. Add a label to one of the AI-generated responses.
  3. Click "Remove" on this label, and a dialog box will pop up for confirmation.
  4. Click "Add Annotation" again on this message.

The console shows a "blocked by CORS" error, and the message on the page has not been marked as removed.

Access to fetch at 'https://xxxxxx/console/api/apps/xxxxxxxx/annotations/' from origin 'https://xxxxxxxxx' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
  1. Then refresh the page, and you will find that the tag has been removed.
    The above errors can be replicated.

My Dify web(https://example.com:7650) service and API service(https://example.com:7655) are not on the same domain.Here are the configurations for my server.

WEB_API_CORS_ALLOW_ORIGINS: '*'
CONSOLE_CORS_ALLOW_ORIGINS: '*'
COOKIE_HTTPONLY: 'true'
COOKIE_SAMESITE: 'None'
COOKIE_SECURE: 'true'

Related issues:https://github.com/langgenius/dify/issues/3663

✔️ Expected Behavior

No response

Actual Behavior

No response

Originally created by @mwnu on GitHub (Apr 21, 2024). ### Self Checks - [X] This is only for bug report, if you would like to ask a quesion, 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] Pleas do not modify this template :) and fill in all the required fields. ### Dify version 0.6.3 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce 1. In the application log, open one of the conversation logs. 2. Add a label to one of the AI-generated responses. 3. Click "Remove" on this label, and a dialog box will pop up for confirmation. 4. Click "Add Annotation" again on this message. The console shows a "blocked by CORS" error, and the message on the page has not been marked as removed. ``` Access to fetch at 'https://xxxxxx/console/api/apps/xxxxxxxx/annotations/' from origin 'https://xxxxxxxxx' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled. ``` 5. Then refresh the page, and you will find that the tag has been removed. The above errors can be replicated. My Dify web(https://example.com:7650) service and API service(https://example.com:7655) are not on the same domain.Here are the configurations for my server. ``` WEB_API_CORS_ALLOW_ORIGINS: '*' CONSOLE_CORS_ALLOW_ORIGINS: '*' COOKIE_HTTPONLY: 'true' COOKIE_SAMESITE: 'None' COOKIE_SECURE: 'true' ``` Related issues:https://github.com/langgenius/dify/issues/3663 ### ✔️ Expected Behavior _No response_ ### ❌ Actual Behavior _No response_
yindo added the 🐞 bug label 2026-02-21 17:45:28 -05:00
yindo closed this issue 2026-02-21 17:45:28 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#2412