Browse Source

Attempt to fix API requests problem (#48)

* Upgrade nginx

* Set proxy_http_version 1.1
main
Marian Steinbach 3 years ago committed by GitHub
parent
commit
468a8b308a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      Dockerfile
  2. 3
      config/nginx/nginx_prod.conf

2
Dockerfile

@ -14,7 +14,7 @@ ADD src /src
RUN yarn build
FROM nginx:1.16-alpine
FROM nginx:1.17-alpine
# move this file, as /etc/nginx/ will be masked by a volume
RUN cp /etc/nginx/mime.types /mime.types

3
config/nginx/nginx_prod.conf

@ -40,6 +40,7 @@ http {
# The last-updated resource will be cached for 5 minutes max.
location = /api/v1/spider-results/last-updated/ {
proxy_pass http://api:5000/api/v1/spider-results/last-updated/;
proxy_http_version 1.1;
proxy_cache api;
proxy_cache_background_update on;
proxy_cache_lock on;
@ -53,6 +54,7 @@ http {
# The big results are stored for a long time
location = /api/v1/spider-results/table/ {
proxy_pass http://api:5000;
proxy_http_version 1.1;
proxy_cache api;
proxy_cache_background_update on;
proxy_cache_lock on;
@ -66,6 +68,7 @@ http {
# All other API calls are cached for 5 minutes
location /api/ {
proxy_pass http://api:5000;
proxy_http_version 1.1;
proxy_cache api;
proxy_cache_background_update on;
proxy_cache_lock on;

Loading…
Cancel
Save