Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: ignore allowedOrigins config for undefined origin header to ensure correct CORS behavior #3033

Conversation

tanlethanh
Copy link
Contributor

Hi Flowise team,

I discovered that after configuring allowedDomains (as dynamic CORS) for a chatflow, It checks my origin header even if it is undefined. The request might be sent from a proxy server or postman and usually sends requests with undefined origin.

The error I got when requesting to /api/v1/prediction from postman or curl was:

{
    "statusCode": 500,
    "success": false,
    "message": "Invalid URL",
    "stack": {}
}

@HenryHengZJ
Copy link
Contributor

thank you @tanlethanh !

@HenryHengZJ HenryHengZJ merged commit 8bb55e0 into FlowiseAI:main Aug 18, 2024
2 checks passed
patrickreinan pushed a commit to patrickreinan/Flowise that referenced this pull request Sep 3, 2024
…ensure correct CORS behavior (FlowiseAI#3033)

fix: ignore allowed origins from chatbot config when origin header is undefined as correct cors behavior
patrickreinan pushed a commit to patrickreinan/Flowise that referenced this pull request Sep 3, 2024
…ensure correct CORS behavior (FlowiseAI#3033)

fix: ignore allowed origins from chatbot config when origin header is undefined as correct cors behavior
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants