All Projects → squidfunk → terraform-aws-api-gateway-enable-cors

squidfunk / terraform-aws-api-gateway-enable-cors

Licence: MIT license
Easily add an OPTIONS method to an API Gateway resource to enable CORS

Programming Languages

HCL
1544 projects

Projects that are alternatives of or similar to terraform-aws-api-gateway-enable-cors

aws-lambda-router
Improved routing for AWS Lambda like SNS and ApiGateway
Stars: ✭ 90 (+60.71%)
Mutual labels:  cors, api-gateway
apollobank
A full stack GraphQL banking application using React, Node & TypeScript.
Stars: ✭ 203 (+262.5%)
Mutual labels:  cors
mezzio-cors
CORS component for Mezzio and other PSR-15 middleware runners.
Stars: ✭ 13 (-76.79%)
Mutual labels:  cors
sanic-ext
Extended Sanic functionality
Stars: ✭ 26 (-53.57%)
Mutual labels:  cors
lmdrouter
Go HTTP router library for AWS API Gateway-invoked Lambda Functions
Stars: ✭ 121 (+116.07%)
Mutual labels:  api-gateway
proto2gql
The project has been migrated to https://github.com/EGT-Ukraine/go2gql.
Stars: ✭ 21 (-62.5%)
Mutual labels:  api-gateway
upload-file-to-backblaze-b2-from-browser-example
Demonstrates calling the b2_upload_file Backblaze B2 Cloud Storage API from a web browser using AJAX.
Stars: ✭ 28 (-50%)
Mutual labels:  cors
Hands-On-Serverless-Applications-with-Go
Hands-On Serverless Applications with Go, published by Packt.
Stars: ✭ 92 (+64.29%)
Mutual labels:  api-gateway
Natours
An awesome tour booking web app written in NodeJS, Express, MongoDB 🗽
Stars: ✭ 94 (+67.86%)
Mutual labels:  cors
cv4pve-api-php
Proxmox VE Client API for PHP
Stars: ✭ 45 (-19.64%)
Mutual labels:  api-gateway
lambda-starter
AWS Lambda Starter Kit with latest Babel 7, Jest 24 and Webpack 4.
Stars: ✭ 26 (-53.57%)
Mutual labels:  api-gateway
serverless-node-sequelize-rds-rest-api
Serverless rest api application with Node.js to perform simple CRUD operation using MYSQL database hosted on AWS RDS with Sequelize ORM
Stars: ✭ 43 (-23.21%)
Mutual labels:  api-gateway
send-email-lambda
Simple email sender running on Lambda
Stars: ✭ 70 (+25%)
Mutual labels:  api-gateway
CORS-Proxy-Server
代理转发 CORS 跨域资源请求
Stars: ✭ 13 (-76.79%)
Mutual labels:  cors
ngx-lua-zuul
基于Nginx&Lua 和Netflix Eureka的微服务网关。请看看:https://github.com/tietang/zebra
Stars: ✭ 94 (+67.86%)
Mutual labels:  api-gateway
lambda-multipart-parser
This nodejs module will parse the multipart-form containing files and fields from the AWS lambda event object. It works very well parsing binary and text files.
Stars: ✭ 45 (-19.64%)
Mutual labels:  api-gateway
Helmet
🐺 A Lightweight Cloud Native API Gateway.
Stars: ✭ 124 (+121.43%)
Mutual labels:  api-gateway
dubbo-go-pixiu
Based on the proxy gateway service of dubbo-go, it solves the problem that the external protocol calls the internal Dubbo cluster. At present, it supports HTTP and gRPC[developing].
Stars: ✭ 385 (+587.5%)
Mutual labels:  api-gateway
kong-oidc-auth
OpenID Connect authentication with Kong gateway
Stars: ✭ 41 (-26.79%)
Mutual labels:  api-gateway
yake
A Rake-like DSL for writing AWS Lambda handlers
Stars: ✭ 146 (+160.71%)
Mutual labels:  api-gateway

Travis Gitter GitHub

Terraform AWS API Gateway Enable CORS

A Terraform module to add an OPTIONS method to allow Cross-Origin Resource Sharing (CORS) preflight requests.

Usage

module "cors" {
  source = "squidfunk/api-gateway-enable-cors/aws"
  version = "0.3.3"

  api_id          = "<api_id>"
  api_resource_id = "<api_resource_id>"
}

By default, this will create a new MOCK endpoint on the provided API Gateway resource allowing CORS preflight requests for all methods and all origins by default. Of course this can be customized using variables as stated in the next section.

Configuration

The following variables can be configured:

Required

api_id

  • Description: API identifier
  • Default: none

api_resource_id

  • Description: API resource identifier
  • Default: none

Optional

allow_headers

  • Description: Allow headers (Access-Control-Allow-Headers)

  • Default:

    [
      "Authorization",
      "Content-Type",
      "X-Amz-Date",
      "X-Amz-Security-Token",
      "X-Api-Key"
    ]

allow_methods

  • Description: Allow methods (Access-Control-Allow-Methods)

  • Default:

    [
      "OPTIONS",
      "HEAD",
      "GET",
      "POST",
      "PUT",
      "PATCH",
      "DELETE"
    ]

allow_origin

  • Description: Allow origin (Access-Control-Allow-Origin)
  • Default: "*"

allow_max_age

  • Description: Allow caching time (Access-Control-Allow-Max-Age)
  • Default: "7200"

allow_credentials

  • Description: Allow credentials (Access-Control-Allow-Credentials)
  • Default: none

Outputs

None.

License

MIT License

Copyright (c) 2018-2020 Martin Donath

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].