Giter Club home page Giter Club logo

Comments (4)

alexdebrie avatar alexdebrie commented on August 27, 2024

Hey @mpadmaraj, good questions. Responses below:

  1. The default CORS settings (with cors: true) does not include OPTIONS for now. It's something I'll discuss with @mthenw going forward.

  2. 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.

mpadmaraj avatar mpadmaraj commented on August 27, 2024

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.

alexdebrie avatar alexdebrie commented on August 27, 2024

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.

mpadmaraj avatar mpadmaraj commented on August 27, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.