Ayush6543
12/17/2022, 2:50 PMsignin:1
Access to fetch at 'https://8fx6k5jmyg.execute-api.eu-central-1.amazonaws.com/auth/session/refresh' from origin 'https://loquacious-crostata-a45e75.netlify.app' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
rp
12/17/2022, 3:03 PMAyush6543
12/17/2022, 5:11 PMrp
12/17/2022, 5:14 PMrp
12/17/2022, 5:46 PMAyush6543
12/17/2022, 5:50 PMrp
12/17/2022, 6:26 PMAyush6543
12/18/2022, 3:02 AMcors
instead of @middy/http-cors @middy/core
rp
12/18/2022, 3:02 AMAyush6543
12/18/2022, 3:07 AMisInServerlessEnv: true,
when I am using express as a framework to deploy on AWS Lambda.rp
12/18/2022, 3:08 AMAyush6543
12/18/2022, 3:13 AMserverless.yaml
. If so How?
This is my serverless.yaml
# Welcome to Serverless!
#
# This file is the main config file for your service.
# It's very minimal at this point and uses default values.
# You can always add more config options for more control.
# We've included some commented out config examples here.
# Just uncomment any of them to get that config option.
#
# For full config options, check the docs:
# docs.serverless.com
#
# Happy Coding!
service: serverless-chrome-extension-app
# app and org for use with dashboard.serverless.com
#app: your-app-name
#org: your-org-name
# You can pin your service to only deploy with a specific Serverless version
# Check out our docs for more details
frameworkVersion: "3"
provider:
name: aws
runtime: nodejs14.x
stage: dev
region: eu-central-1
# you can overwrite defaults here
# stage: dev
# region: us-east-1
functions:
hello:
handler: app.server
events: # events trigger lambda functions
- http: # this is an API Gateway HTTP event trigger
path: /
method: ANY
cors: true
- http: # all routes get proxied to the Express router
path: /{proxy+}
method: ANY
cors: true
rp
12/18/2022, 3:25 AMAyush6543
12/18/2022, 3:28 AMrp
12/18/2022, 4:46 AMAyush6543
12/18/2022, 5:50 AMrp
12/18/2022, 5:55 AM