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

Cors not working on laravel apps #1

Open
prabhat2k15 opened this issue Nov 18, 2020 · 0 comments
Open

Cors not working on laravel apps #1

prabhat2k15 opened this issue Nov 18, 2020 · 0 comments

Comments

@prabhat2k15
Copy link

prabhat2k15 commented Nov 18, 2020

i enable cors on serverless.yml like this

           -   http: 
                 path: 'ANY /'
                 cors: true
           -   http: 
                 path: 'ANY /{proxy+}'
                 cors: true

but it gives me warning given below and api is giving cors error on react app

Serverless:   at 'functions.website.events[0].http': should have required property 'method'
Serverless:   at 'functions.website.events[0].http.path': value 'ANY /' does not satisfy pattern /^(?:\*|\/?\S*)$/
Serverless:   at 'functions.website.events[1].http': should have required property 'method'
Serverless:   at 'functions.website.events[1].http.path': value 'ANY /{proxy+}' does not satisfy pattern /^(?:\*|\/?\S*)$/
Serverless:  
Serverless: Learn more about configuration validation here: http://slss.io/configuration-validation
Serverless:  
Serverless: Deprecation warning: Starting with next major version, API Gateway naming will be changed from "{stage}-{service}" to "{service}-{stage}".
            Set "provider.apiGateway.shouldStartNameWithService" to "true" to adapt to the new behavior now.
            More Info: https://www.serverless.com/framework/docs/deprecations/#AWS_API_GATEWAY_NAME_STARTING_WITH_SERVICE

How to get this working.??

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

No branches or pull requests

1 participant