mirror of
https://github.com/suitenumerique/docs.git
synced 2026-04-26 01:25:05 +02:00
Minio is no longer maintained, its git repository is archived. We need
to replace it. We decided to choose rustfs
7aac2a2c5b
https://github.com/rustfs/rustfs
53 lines
1.7 KiB
Plaintext
53 lines
1.7 KiB
Plaintext
|
|
server {
|
|
listen 8083;
|
|
server_name localhost;
|
|
charset utf-8;
|
|
|
|
# Proxy auth for media
|
|
location /media/ {
|
|
# Auth request configuration
|
|
auth_request /media-auth;
|
|
auth_request_set $authHeader $upstream_http_authorization;
|
|
auth_request_set $authDate $upstream_http_x_amz_date;
|
|
auth_request_set $authContentSha256 $upstream_http_x_amz_content_sha256;
|
|
|
|
# Pass specific headers from the auth response
|
|
proxy_set_header Authorization $authHeader;
|
|
proxy_set_header X-Amz-Date $authDate;
|
|
proxy_set_header X-Amz-Content-SHA256 $authContentSha256;
|
|
|
|
# Get resource from rustfs
|
|
proxy_pass http://rustfs:9000/impress-media-storage/;
|
|
proxy_set_header Host rustfs:9000;
|
|
|
|
add_header Content-Security-Policy "default-src 'none'" always;
|
|
}
|
|
|
|
location /media-auth {
|
|
proxy_pass http://app-dev:8000/api/v1.0/documents/media-auth/;
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_set_header X-Original-URL $request_uri;
|
|
|
|
# Prevent the body from being passed
|
|
proxy_pass_request_body off;
|
|
proxy_set_header Content-Length "";
|
|
proxy_set_header X-Original-Method $request_method;
|
|
}
|
|
|
|
location / {
|
|
proxy_pass http://keycloak:8080;
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
|
|
# Increase proxy buffer size to allow keycloak to send large
|
|
# header responses when a user is created.
|
|
proxy_buffer_size 128k;
|
|
proxy_buffers 4 256k;
|
|
proxy_busy_buffers_size 256k;
|
|
}
|
|
}
|