Allow push (#59)
Introduce ALLOW_PUSH, if set to true, allows non-GET methods through the proxy
This commit is contained in:
12
nginx.conf
12
nginx.conf
@@ -219,16 +219,8 @@ echo "Docker configured with HTTPS_PROXY=$scheme://$http_host/"
|
||||
# Docker needs this. Don't ask.
|
||||
chunked_transfer_encoding on;
|
||||
|
||||
# Block POST/PUT/DELETE. Don't use this proxy for pushing.
|
||||
if ($request_method = POST) {
|
||||
return 405 "POST method is not allowed";
|
||||
}
|
||||
if ($request_method = PUT) {
|
||||
return 405 "PUT method is not allowed";
|
||||
}
|
||||
if ($request_method = DELETE) {
|
||||
return 405 "DELETE method is not allowed";
|
||||
}
|
||||
# configuration of the different allowed methods
|
||||
include "/etc/nginx/conf.d/allowed.methods.conf";
|
||||
|
||||
proxy_read_timeout 900;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user