🎉 Add plugable storages abstraction layer (with support for fs, s3 and db).

This commit is contained in:
Andrey Antukh
2021-01-07 11:29:57 +01:00
committed by Alonso Torres
parent 9146642947
commit 760eb926bf
16 changed files with 893 additions and 17 deletions
+28
View File
@@ -57,6 +57,9 @@ http {
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
resolver 8.8.8.8;
etag off;
location / {
@@ -68,6 +71,31 @@ http {
proxy_pass http://127.0.0.1:6060/api;
}
location /storage {
proxy_pass http://127.0.0.1:6060/storage;
recursive_error_pages on;
proxy_intercept_errors on;
error_page 301 302 307 = @handle_redirect;
}
location @handle_redirect {
set $redirect_uri "$upstream_http_location";
set $redirect_host "$upstream_http_x_host";
set $redirect_cache_control "$upstream_http_cache_control";
proxy_buffering off;
add_header x-internal-redirect "$redirect_uri";
add_header cache-control "$redirect_cache_control";
proxy_set_header Host "$redirect_host";
proxy_hide_header x-amz-id-2;
proxy_hide_header x-amz-request-id;
proxy_hide_header x-amz-meta-server-side-encryption;
proxy_hide_header x-amz-server-side-encryption;
proxy_pass $redirect_uri;
}
location /export {
proxy_pass http://127.0.0.1:6061;
}