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

[HTTP][CORS] Exact value origin match fails #501

Open
chamil321 opened this issue May 20, 2020 · 0 comments
Open

[HTTP][CORS] Exact value origin match fails #501

chamil321 opened this issue May 20, 2020 · 0 comments
Labels
module/http Team/PCM Protocol connector packages related issues Type/Bug

Comments

@chamil321
Copy link
Contributor

Description:
Test the following issue from slack:

My client is an angular implementation deployed on Nginx in domainA. My ballerina services run in domainB. In fact, 
the nginx server is deployed on an IP address in domainB and the DNS from domainA has a record 
pointing to that IP address. To fix the CORS issues I used to following configuration for my service: 
@http: ServiceConfig{ basePath: "...", cors: {allowOrigins: [""], allowCredentials: false, allowHeaders: 
["*"], maxAge: 84900}}While the wildcard option seems to be working when I check the site from 
domainA my services are throwing a CORS error Cross-origin request blocked. When I try to set an 
exact match for the origins (e.g., https://domainA) I get an error everywhere. Any idea how I can fix it?


Cross-origin request blocked is the error I get in the domain or when I try the exact match with the 
URL

like I said earlier using allowOrigins: ["*"] only works outside domainA. Inside domainA I don't get the 
http response to my services

that's the one I get while checking from domainA

cors

@chamil321 chamil321 transferred this issue from ballerina-platform/ballerina-lang Oct 29, 2020
@anupama-pathirage anupama-pathirage added the Team/PCM Protocol connector packages related issues label Mar 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module/http Team/PCM Protocol connector packages related issues Type/Bug
Projects
None yet
Development

No branches or pull requests

3 participants