Skip to content

Instantly share code, notes, and snippets.

@inkychris
Created May 13, 2020 10:15
Show Gist options
  • Save inkychris/c803d2a32f97fc6a2857d8a48c38ad61 to your computer and use it in GitHub Desktop.
Save inkychris/c803d2a32f97fc6a2857d8a48c38ad61 to your computer and use it in GitHub Desktop.
A minimal HTTP Nginx config for serving static files
worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
server {
listen 80;
listen [::]:80;
server_name _;
root /src;
location / {
try_files $uri $uri/ =404;
add_header Content-Security-Policy "sandbox allow-forms allow-modals allow-popups allow-presentation allow-scripts allow-top-navigation";
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment