nginx-vhost.conf 608 Bytes
Newer Older
root's avatar
root committed
1
2
3
4
5
6
server {
    listen       8000;
    listen  [::]:8000;
    server_name  localhost;

    location / {
root's avatar
root committed
7
8
9
        gzip on;
        gzip_types image/png image/svg+xml application/json application/javascript text/css;

Clemens Albrecht's avatar
Clemens Albrecht committed
10
        add_header 'Access-Control-Allow-Origin' 'https://example.com';
root's avatar
root committed
11
12
13
14
15
16
17
        add_header 'Access-Control-Allow-Methods' 'GET';
        add_header 'Access-Control-Allow-Headers' 'DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range';
        add_header 'Access-Control-Expose-Headers' 'Content-Length,Content-Range'; 
        root   /usr/share/nginx/html;
    }
}