Skip to content

Commit ebf8479

Browse files
committed
Update caddy.conf
1 parent df0b8f7 commit ebf8479

1 file changed

Lines changed: 12 additions & 9 deletions

File tree

  • resources/modules/Caddy/ospanel_data/default/templates

resources/modules/Caddy/ospanel_data/default/templates/caddy.conf

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -523,11 +523,19 @@
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" {
@@ -610,6 +618,7 @@
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

@@ -639,6 +648,7 @@
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
}
@@ -670,14 +680,7 @@
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
}

0 commit comments

Comments
 (0)