Skip to content

Commit 64674b6

Browse files
sampaccoudAntoLC
authored andcommitted
♻️(backend) rename, factorize and improve the subrequest media auth view
We want to use the same pattern for the websocket collaboration service authorization as what we use for media files. This addition comes in the next commit but doing it efficiently required factorizing some code with the media auth view.
1 parent a9def8c commit 64674b6

File tree

8 files changed

+207
-160
lines changed

8 files changed

+207
-160
lines changed

docker/files/etc/nginx/conf.d/default.conf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ server {
66

77
location /media/ {
88
# Auth request configuration
9-
auth_request /auth;
9+
auth_request /media-auth;
1010
auth_request_set $authHeader $upstream_http_authorization;
1111
auth_request_set $authDate $upstream_http_x_amz_date;
1212
auth_request_set $authContentSha256 $upstream_http_x_amz_content_sha256;
@@ -21,8 +21,8 @@ server {
2121
proxy_set_header Host minio:9000;
2222
}
2323

24-
location /auth {
25-
proxy_pass http://app-dev:8000/api/v1.0/documents/retrieve-auth/;
24+
location /media-auth {
25+
proxy_pass http://app-dev:8000/api/v1.0/documents/media-auth/;
2626
proxy_set_header Host $host;
2727
proxy_set_header X-Real-IP $remote_addr;
2828
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

0 commit comments

Comments
 (0)