Added files

This commit is contained in:
Lutchy Horace 2025-04-02 10:38:38 -04:00
parent a1b53b9d49
commit 71972e5f8d
5 changed files with 268 additions and 1 deletions

29
nginx.conf.example Normal file
View file

@ -0,0 +1,29 @@
http {
# ... other http configurations ...
map $http_authorization $is_s3_auth {
default 0;
~AWS4-HMAC-SHA256 1; # Check for AWS S3 v4 authorization
}
server {
listen 80; # Or your desired port
server_name yourdomain.com; # Or your domain
location / {
if ($request_method = PUT) {
if ($is_s3_auth = 1) {
# PUT request with S3 authorization: proxy to s3_backend
proxy_pass http://s3_backend;
break; # Stop further processing in this location
}
}
# All other requests (or PUT without S3 auth): proxy to default_backend
proxy_pass http://default_backend;
}
# ... other locations ...
}
# ... other http configurations ...
}