Skip to content

Instantly share code, notes, and snippets.

@agouriou
agouriou / nginx.conf
Last active April 5, 2024 15:57 — forked from Stanback/nginx.conf
Example Nginx (> 1.9) configuration for adding cross-origin resource sharing (CORS) support to reverse proxied APIs. Handle error status (4xx, 5xx) and expose headers.
#
# CORS header support
#
# One way to use this is by placing it into a file called "cors_support"
# under your Nginx configuration directory and placing the following
# statement inside your location block(s):
#
# include cors_support;
#
# A limitation to this method is that Nginx doesn't currently send headers