mirror of
https://github.com/aljazceru/landscape-template.git
synced 2026-01-31 12:14:30 +01:00
fix: enable cors
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
[build]
|
||||
functions = "functions" # netlify-lambda builds to this folder AND Netlify reads functions from here
|
||||
publish = "build" # create-react-app builds to this folder, Netlify should serve all these files statically
|
||||
publish = "build" # create-react-app builds to this folder, Netlify should serve all these files statically
|
||||
|
||||
[dev]
|
||||
framework = "#static"
|
||||
functions = "functions" # netlify-lambda builds to this folder AND Netlify reads functions from here
|
||||
publish = "build" # create-react-app builds to this folder, Netlify should serve all these files statically
|
||||
|
||||
24
serverless.yml
Normal file
24
serverless.yml
Normal file
@@ -0,0 +1,24 @@
|
||||
custom:
|
||||
serverless-offline:
|
||||
httpPort: 8888
|
||||
corsAllowHeaders: "*"
|
||||
|
||||
plugins:
|
||||
- serverless-offline
|
||||
service: serverless-graphql
|
||||
provider:
|
||||
name: aws
|
||||
runtime: nodejs12.x
|
||||
|
||||
functions:
|
||||
graphql:
|
||||
handler: functions/graphql/index.handler
|
||||
events:
|
||||
- http:
|
||||
path: graphql
|
||||
method: post
|
||||
cors: true
|
||||
- http:
|
||||
path: graphql
|
||||
method: get
|
||||
cors: true
|
||||
Reference in New Issue
Block a user