Skip to content

Instantly share code, notes, and snippets.

@discordianfish
Created November 19, 2021 10:35
Show Gist options
  • Save discordianfish/8713a58b25ebb0b456d475f699a2cbc4 to your computer and use it in GitHub Desktop.
Save discordianfish/8713a58b25ebb0b456d475f699a2cbc4 to your computer and use it in GitHub Desktop.
minimal nginx config with CORS and COEP headers set
daemon off;
events {}
error_log /dev/stdout info;
http {
include /usr/local/etc/nginx/mime.types;
access_log /dev/stdout;
server {
listen 9000;
location / {
add_header Access-Control-Allow-Origin *;
add_header 'Cross-Origin-Embedder-Policy' 'require-corp';
add_header 'Cross-Origin-Opener-Policy' 'same-origin';
root /path/to/html;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment