The website access to the console API has been blocked by the CORS policy. #2407

Closed
opened 2026-02-21 17:45:24 -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

In the logs and annotations, for the content that has been annotated:
Clicking "remove" brings up a dialog box that says "Delete this annotation."
Clicking "confirm" has no response.
Looking at the browser console, an error is found:

Access to fetch at 'https://xxxx:7655/console/api/apps/xxxxxxxxxx/annotations/' from origin 'https://xxxxx:7650' 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.

Prerequisites:
I have already configured in the dify-api container environment: WEB_API_CORS_ALLOW_ORIGINS: '*' and CONSOLE_CORS_ALLOW_ORIGINS: '*', I even configured these two environment variables in both the worker and web.
These are the service URLs I specified, except for not being able to delete the annotation, I haven't found any issues:
CONSOLE_WEB_URL: 'https://example.com:7650'
CONSOLE_API_URL: 'https://example.com:7655'
SERVICE_API_URL: 'https://example.com:7655'
APP_WEB_URL: 'https://example.com:7650'
FILES_URL: 'https://example.com:7655'

✔️ Expected Behavior

No response

Actual Behavior

PixPin_2024-04-22_05-44-55
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 In the logs and annotations, for the content that has been annotated: Clicking "remove" brings up a dialog box that says "Delete this annotation." Clicking "confirm" has no response. Looking at the browser console, an error is found: ``` Access to fetch at 'https://xxxx:7655/console/api/apps/xxxxxxxxxx/annotations/' from origin 'https://xxxxx:7650' 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. ``` ----- Prerequisites: I have already configured in the dify-api container environment: `WEB_API_CORS_ALLOW_ORIGINS: '*'` and `CONSOLE_CORS_ALLOW_ORIGINS: '*'`, I even configured these two environment variables in both the worker and web. These are the service URLs I specified, except for not being able to delete the annotation, I haven't found any issues: CONSOLE_WEB_URL: 'https://example.com:7650' CONSOLE_API_URL: 'https://example.com:7655' SERVICE_API_URL: 'https://example.com:7655' APP_WEB_URL: 'https://example.com:7650' FILES_URL: 'https://example.com:7655' ### ✔️ Expected Behavior _No response_ ### ❌ Actual Behavior <img width="1473" alt="PixPin_2024-04-22_05-44-55" src="https://github.com/langgenius/dify/assets/45463732/8911bf06-f282-4e9d-a74b-3c006d449b35">
yindo added the 🐞 bug label 2026-02-21 17:45:24 -05:00
yindo closed this issue 2026-02-21 17:45:24 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#2407