Comments (4)
Hey @mpadmaraj, good questions. Responses below:
-
The default CORS settings (with
cors: true
) does not includeOPTIONS
for now. It's something I'll discuss with @mthenw going forward. -
Internally, the Event Gateway includes your space (
<tenant>-<app>
) in its path. However, it should not affect you when you're actually making HTTP calls. Your tenant and app will be extracted from the subdomain when you make a request to the Event Gateway:
https://padmaraj-appmail.slsgateway.com/send/message --> /padmaraj-appmail/send/message
Let me know if that answers your question. Also, could you revoke the Access Key and generate a new one since it's been posted in this issue?
from event-gateway-sdk.
Apologise for posting the key. I have deleted from my comments above and also revoked it. OPTIONS was not getting Access-Control-Allow-Origin
header that was the reason I was thinking path could be the issue. I tried to remove and re-deploy couple of times but that did not help.
from event-gateway-sdk.
No worries, it happens 😄
Are you making an OPTIONS
request directly, or doing it as part of the CORS preflight request?
from event-gateway-sdk.
I had tried both. First from javascript, tried to POST
. Then I tried to hit OPTIONS
, from the POSTMAN. This is what is getting printed in browser console
Failed to load https://padmaraj-appmail.slsgateway.com/send/message: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://127.0.0.1:5500' is therefore not allowed access.
Tried with my local IP but that did not work either.
I then tried POST
request from JSFiddle and that worked!
Curious to know what exactly does the CORS filter do and if it has some kind of rules.
For now I will test by pushing this to S3.
from event-gateway-sdk.
Related Issues (15)
- Follow proper casing for API key config parameter HOT 5
- Python sdk support HOT 2
- Bug: Invoking functions seems to be broken. HOT 2
- Information on EG integrations is hard to find
- CloudEvent object HOT 7
- Getting "process is undefined" error when using unpack build HOT 1
- updateSubscription method is missing
- Cannot set CORS configuration. Error will also not parse.
- Emit method does not work with sync subscription HOT 4
- Add ability to specify path and/or additional headers for "emit" request. HOT 1
- Enable CORS HOT 13
- Wrong url set with multiple applications HOT 4
- Get / Show Specific Resource
- Golang SDK support
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from event-gateway-sdk.