File tree Expand file tree Collapse file tree
resources/modules/Caddy/ospanel_data/default/templates Expand file tree Collapse file tree Original file line number Diff line number Diff line change 523523 }
524524}
525525
526+ # Timeouts
527+ (timeouts_config) {
528+ dial_timeout 5s
529+ response_header_timeout 15m
530+ read_timeout 15m
531+ write_timeout 60s
532+ }
533+
526534# Common host configuration
527535(common_host) {
528536 # Limit incoming request body to protect from oversized uploads/DoS.
529537 request_body {
530- max_size 256MB
538+ max_size 160MB
531539 }
532540 log {
533541 output file "{root_dir}/logs/domains/{args[0]}_caddy.log" {
610618 # env COUNTRY_CODE {geoip2.country_code}
611619 # env COUNTRY_NAME {geoip2.country_name}
612620 import fastcgi_intercept_errors
621+ import timeouts_config
613622 try_files {path} =404
614623 }
615624
639648 import env_{args[0]}
640649 # env COUNTRY_CODE {geoip2.country_code}
641650 # env COUNTRY_NAME {geoip2.country_name}
651+ import timeouts_config
642652 import fastcgi_intercept_errors
643653 try_files {path} /index.php
644654 }
670680 header_up X-Request-Id {http.request.uuid}
671681
672682 transport http {
673- # connect timeout
674- dial_timeout 10s
675- # how long we’re willing to wait for the “first byte” of the response from the app/upstream
676- response_header_timeout 30m
677- # so Caddy doesn’t cut off a long response body transfer
678- read_timeout 30m
679- # if you send large bodies to the upstream (upload is proxied further)
680- write_timeout 30m
683+ import timeouts_config
681684 }
682685 }
683686}
You can’t perform that action at this time.
0 commit comments