5 error_log /dev/stderr warn;
7 client_max_body_size 4G;
10 proxy_buffer_size 32k;
21 location ~ ^/media/.*\.(mp3|ogg|daisy\.zip)$ {
22 add_header Content-Disposition "attachment";
24 location ~ ^/media/.*\.txt$ {
25 add_header Content-Type "text/plain; charset=utf-8";
27 location ~ ^/media/book/(pdf|epub|mobi|fb2|cover|xml)/ {
29 add_header Last-Modified $date_gmt;
30 add_header Cache-Control 'no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0';
31 if_modified_since off;
37 add_header 'Access-Control-Allow-Origin' '*' always;
38 add_header 'Access-Control-Allow-Methods' 'GE, POST, PUT, DELETE' always;
39 add_header 'Access-Control-Allow-Headers' 'Authorization, Content-Type' always;
40 add_header 'Access-Control-Expose-Headers' 'Link' always;
42 if ($request_method = OPTIONS) {
46 proxy_set_header Accept-Language "";
47 proxy_set_header Host $host;
48 proxy_pass http://web:8000;
51 root /app/var/static/root;
52 try_files $uri @backend;
56 proxy_set_header Accept-Language "";
57 proxy_set_header Host $host;
58 proxy_pass http://web:8000;