Skip to content

Instantly share code, notes, and snippets.

View gjesse's full-sized avatar
🤘
message not available

Jesse Hodges gjesse

🤘
message not available
View GitHub Profile
@gjesse
gjesse / nginx-cors.conf
Created February 6, 2017 23:42 — forked from algal/nginx-cors.conf
nginx configuration for CORS (Cross-Origin Resource Sharing), with an origin whitelist, and HTTP Basic Access authentication allowed
#
# A CORS (Cross-Origin Resouce Sharing) config for nginx
#
# == Purpose
#
# This nginx configuration enables CORS requests in the following way:
# - enables CORS just for origins on a whitelist specified by a regular expression
# - CORS preflight request (OPTIONS) are responded immediately
# - Access-Control-Allow-Credentials=true for GET and POST requests