Skip to content

Commit 5d3ec45

Browse files
gitforbitmjuraga
authored andcommitted
FEATURE/MEDIUM: cookie: added better support for cookie
1 parent 023aabe commit 5d3ec45

File tree

3 files changed

+81
-4
lines changed

3 files changed

+81
-4
lines changed

build/haproxy_spec.yaml

Lines changed: 41 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ definitions:
271271
type: string
272272
x-display-name: Continuous Statistics
273273
cookie:
274-
type: string
274+
$ref: '#/definitions/cookie'
275275
default_backend:
276276
pattern: ^[A-Za-z0-9-_.:]+$
277277
type: string
@@ -536,7 +536,7 @@ definitions:
536536
type: integer
537537
x-nullable: true
538538
cookie:
539-
type: string
539+
$ref: '#/definitions/cookie'
540540
x-dependency:
541541
mode:
542542
value: http
@@ -2671,6 +2671,45 @@ definitions:
26712671
type: string
26722672
type: object
26732673
x-display-name: Error File
2674+
cookie:
2675+
properties:
2676+
domain:
2677+
items:
2678+
pattern: ^[^\s]+$
2679+
type: string
2680+
type: array
2681+
dynamic:
2682+
type: boolean
2683+
httponly:
2684+
type: boolean
2685+
indirect:
2686+
type: boolean
2687+
maxidle:
2688+
pattern: ^[^\d+$]
2689+
type: integer
2690+
maxlife:
2691+
pattern: ^[^\d+$]
2692+
type: integer
2693+
name:
2694+
pattern: ^[^\s]+$
2695+
type: string
2696+
nocache:
2697+
type: boolean
2698+
postonly:
2699+
type: boolean
2700+
preserve:
2701+
type: boolean
2702+
secure:
2703+
type: boolean
2704+
type:
2705+
enum:
2706+
- rewrite
2707+
- insert
2708+
- prefix
2709+
type: string
2710+
required:
2711+
- name
2712+
type: object
26742713
responses:
26752714
BadRequest:
26762715
description: Bad request

haproxy-spec.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,8 @@ definitions:
188188
$ref: "models/haproxy.yaml#/redispatch"
189189
errorfile:
190190
$ref: "models/haproxy.yaml#/errorfile"
191+
cookie:
192+
$ref: "models/haproxy.yaml#/cookie"
191193
responses:
192194
BadRequest:
193195
description: Bad request

models/haproxy.yaml

Lines changed: 38 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ defaults:
150150
enum: [enabled]
151151
x-display-name: Continuous Statistics
152152
cookie:
153-
type: string
153+
$ref: '#/definitions/cookie'
154154
client_timeout:
155155
type: integer
156156
x-nullable: true
@@ -356,7 +356,7 @@ backend:
356356
mode:
357357
value: http
358358
cookie:
359-
type: string
359+
$ref: '#/definitions/cookie'
360360
x-dependency:
361361
mode:
362362
value: http
@@ -1428,3 +1428,39 @@ errorfile:
14281428
enum: [200, 400, 403, 405, 408, 425, 429, 500, 502, 503, 504]
14291429
file:
14301430
type: string
1431+
cookie:
1432+
type: object
1433+
required:
1434+
- name
1435+
properties:
1436+
name:
1437+
type: string
1438+
pattern: '^[^\s]+$'
1439+
type:
1440+
type: string
1441+
enum: [rewrite, insert, prefix]
1442+
indirect:
1443+
type: boolean
1444+
nocache:
1445+
type: boolean
1446+
postonly:
1447+
type: boolean
1448+
preserve:
1449+
type: boolean
1450+
httponly:
1451+
type: boolean
1452+
secure:
1453+
type: boolean
1454+
domain:
1455+
type: array
1456+
items:
1457+
type: string
1458+
pattern: '^[^\s]+$'
1459+
maxidle:
1460+
type: integer
1461+
pattern: '^[^\d+$]'
1462+
maxlife:
1463+
type: integer
1464+
pattern: '^[^\d+$]'
1465+
dynamic:
1466+
type: boolean

0 commit comments

Comments
 (0)