This repository was archived by the owner on Feb 9, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -79,6 +79,10 @@ def node
7979 attributes [ 'container_envvars' ] . find { |e | e [ 'key' ] == 'DOCKERCLOUD_NODE_FQDN' } [ 'value' ]
8080 end
8181
82+ def client_max_body_size
83+ attributes [ 'container_envvars' ] . find { |e | e [ 'key' ] == 'NGINX_CLIENT_MAX_BODY_SIZE' } [ 'value' ] || '1m'
84+ end
85+
8286 def running?
8387 [ 'Starting' , 'Running' ] . include? ( attributes [ 'state' ] )
8488 end
@@ -123,6 +127,10 @@ def ssl?
123127 @ssl ||= containers . first . ssl? rescue nil
124128 end
125129
130+ def client_max_body_size
131+ @client_max_body_size ||= containers . first . client_max_body_size rescue "1m"
132+ end
133+
126134 def running?
127135 @state ||= begin
128136 [ 'Running' , 'Partly running' ] . include? ( attributes [ 'state' ] )
Original file line number Diff line number Diff line change @@ -62,6 +62,7 @@ server {
6262
6363server {
6464 server_name <%= service.host %> ;
65+ client_max_body_size <%= service.client_max_body_size %> ;
6566 listen 443 ssl http2;
6667
6768 ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
@@ -85,6 +86,7 @@ server {
8586
8687server {
8788 server_name <%= service.host %> ;
89+ client_max_body_size <%= service.client_max_body_size %> ;
8890 location / {
8991 proxy_pass http://<%= service.name %> ;
9092 }
You can’t perform that action at this time.
0 commit comments