File tree Expand file tree Collapse file tree 3 files changed +22
-6
lines changed Expand file tree Collapse file tree 3 files changed +22
-6
lines changed Original file line number Diff line number Diff line change @@ -203,7 +203,8 @@ func TestToDefinition(t *testing.T) {
203
203
"default_self_signed" : false ,
204
204
},
205
205
"http_options" : map [string ]any {
206
- "compress" : true ,
206
+ "compress" : true ,
207
+ "idle_timeout" : int64 (600 ),
207
208
"response" : map [string ]any {
208
209
"headers" : map [string ]any {
209
210
"fly-request-id" : false ,
@@ -340,10 +341,13 @@ func TestToDefinition(t *testing.T) {
340
341
},
341
342
"ports" : []any {
342
343
map [string ]any {
343
- "port" : int64 (80 ),
344
- "start_port" : int64 (100 ),
345
- "end_port" : int64 (200 ),
346
- "handlers" : []any {"https" },
344
+ "port" : int64 (80 ),
345
+ "start_port" : int64 (100 ),
346
+ "end_port" : int64 (200 ),
347
+ "handlers" : []any {"https" },
348
+ "http_options" : map [string ]any {
349
+ "idle_timeout" : int64 (600 ),
350
+ },
347
351
"force_https" : true ,
348
352
},
349
353
},
Original file line number Diff line number Diff line change @@ -430,7 +430,8 @@ func TestLoadTOMLAppConfigReferenceFormat(t *testing.T) {
430
430
DefaultSelfSigned : fly .Pointer (false ),
431
431
},
432
432
HTTPOptions : & fly.HTTPOptions {
433
- Compress : fly .Pointer (true ),
433
+ Compress : fly .Pointer (true ),
434
+ IdleTimeout : UintPointer (600 ),
434
435
Response : & fly.HTTPResponseOptions {
435
436
Headers : map [string ]any {
436
437
"fly-request-id" : false ,
@@ -553,6 +554,9 @@ func TestLoadTOMLAppConfigReferenceFormat(t *testing.T) {
553
554
EndPort : fly .Pointer (200 ),
554
555
Handlers : []string {"https" },
555
556
ForceHTTPS : true ,
557
+ HTTPOptions : & fly.HTTPOptions {
558
+ IdleTimeout : UintPointer (600 ),
559
+ },
556
560
},
557
561
},
558
562
@@ -684,3 +688,7 @@ func TestYAMLPrettyPrint(t *testing.T) {
684
688
assert .Contains (t , string (buf ), "\n \n experimental:\n cmd:\n - cmd\n " )
685
689
assert .Contains (t , string (buf ), "\n processes:\n - web\n " )
686
690
}
691
+
692
+ func UintPointer (v uint32 ) * uint32 {
693
+ return & v
694
+ }
Original file line number Diff line number Diff line change @@ -94,6 +94,7 @@ host_dedication_id = "06031957"
94
94
# https://community.fly.io/t/new-feature-basic-http-response-header-modification/3594
95
95
[http_service .http_options ]
96
96
compress = true
97
+ idle_timeout = 600
97
98
98
99
[http_service .http_options .response .headers ]
99
100
fly-request-id = false
@@ -189,6 +190,9 @@ host_dedication_id = "06031957"
189
190
handlers = [" https" ]
190
191
force_https = true
191
192
193
+ [services .ports .http_options ]
194
+ idle_timeout = 600
195
+
192
196
[[services .tcp_checks ]]
193
197
interval = " 21s"
194
198
timeout = " 4s"
You can’t perform that action at this time.
0 commit comments