mirror of
https://gitlab.isc.org/isc-projects/kea
synced 2025-08-22 09:57:41 +00:00
[#3609] Checkpoint: doing syntax
This commit is contained in:
parent
3193b4f7b4
commit
fc3a84eb29
@ -18,6 +18,16 @@
|
||||
// is specifically for HA updates only.
|
||||
"http-port": 8000,
|
||||
|
||||
// Extra HTTP headers to add in responses.
|
||||
"http-headers":
|
||||
[
|
||||
{
|
||||
"comment": "HSTS header",
|
||||
"name": "Strict-Transport-Security",
|
||||
"value": "max-age=31536000"
|
||||
}
|
||||
],
|
||||
|
||||
// In authentication
|
||||
"authentication":
|
||||
{
|
||||
|
@ -15,6 +15,21 @@
|
||||
// is specifically for HA updates only.
|
||||
"http-port": 8000,
|
||||
|
||||
// Extra HTTP headers to add in responses.
|
||||
"http-headers":
|
||||
[
|
||||
{
|
||||
// Optional user context.
|
||||
"user-context": { "comment": "HSTS header" },
|
||||
|
||||
// Required HTTP header name.
|
||||
"name": "Strict-Transport-Security",
|
||||
|
||||
// Required HTTP header value.
|
||||
"value": "max-age=31536000"
|
||||
}
|
||||
],
|
||||
|
||||
// Optional authentication.
|
||||
"authentication":
|
||||
{
|
||||
|
@ -191,6 +191,21 @@
|
||||
// means they are optional.
|
||||
"cert-required": true,
|
||||
|
||||
// Extra HTTP headers to add in responses.
|
||||
"http-headers":
|
||||
[
|
||||
{
|
||||
// Optional user context.
|
||||
"user-context": { "comment": "HSTS header" },
|
||||
|
||||
// Required HTTP header name.
|
||||
"name": "Strict-Transport-Security",
|
||||
|
||||
// Required HTTP header value.
|
||||
"value": "max-age=31536000"
|
||||
}
|
||||
],
|
||||
|
||||
// Optional authentication.
|
||||
"authentication": {
|
||||
|
||||
|
@ -142,6 +142,21 @@
|
||||
// means they are optional.
|
||||
"cert-required": true,
|
||||
|
||||
// Extra HTTP headers to add in responses.
|
||||
"http-headers":
|
||||
[
|
||||
{
|
||||
// Optional user context.
|
||||
"user-context": { "comment": "HSTS header" },
|
||||
|
||||
// Required HTTP header name.
|
||||
"name": "Strict-Transport-Security",
|
||||
|
||||
// Required HTTP header value.
|
||||
"value": "max-age=31536000"
|
||||
}
|
||||
],
|
||||
|
||||
// Optional authentication.
|
||||
"authentication": {
|
||||
|
||||
|
@ -1138,6 +1138,7 @@ namespace isc { namespace agent {
|
||||
ctx.unique("http-headers", ctx.loc2pos(yystack_[0].location));
|
||||
ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location)));
|
||||
ctx.stack_.back()->set("http-headers", l);
|
||||
ctx.stack_.push_back(l);
|
||||
ctx.enter(ctx.HTTP_HEADERS);
|
||||
}
|
||||
#line 1144 "agent_parser.cc"
|
||||
|
@ -412,6 +412,7 @@ http_headers: HTTP_HEADERS {
|
||||
ctx.unique("http-headers", ctx.loc2pos(@1));
|
||||
ElementPtr l(new ListElement(ctx.loc2pos(@1)));
|
||||
ctx.stack_.back()->set("http-headers", l);
|
||||
ctx.stack_.push_back(l);
|
||||
ctx.enter(ctx.HTTP_HEADERS);
|
||||
} COLON LSQUARE_BRACKET http_header_list RSQUARE_BRACKET {
|
||||
ctx.stack_.pop_back();
|
||||
@ -445,7 +446,7 @@ http_header_params: http_header_param
|
||||
;
|
||||
|
||||
http_header_param: name
|
||||
| value
|
||||
| header_value
|
||||
| user_context
|
||||
| comment
|
||||
| unknown_map_entry
|
||||
@ -460,7 +461,7 @@ name: NAME {
|
||||
ctx.leave();
|
||||
};
|
||||
|
||||
value: VALUE {
|
||||
header_value: VALUE {
|
||||
ctx.unique("value", ctx.loc2pos(@1));
|
||||
ctx.enter(ctx.NO_KEYWORDS);
|
||||
} COLON STRING {
|
||||
|
9
src/bin/agent/tests/testdata/get_config.json
vendored
9
src/bin/agent/tests/testdata/get_config.json
vendored
@ -49,6 +49,15 @@
|
||||
}
|
||||
}
|
||||
],
|
||||
"http-headers": [
|
||||
{
|
||||
"name": "Strict-Transport-Security",
|
||||
"user-context": {
|
||||
"comment": "HSTS header"
|
||||
},
|
||||
"value": "max-age=31536000"
|
||||
}
|
||||
],
|
||||
"http-host": "127.0.0.1",
|
||||
"http-port": 8000
|
||||
}
|
||||
|
@ -4176,6 +4176,7 @@ namespace isc { namespace dhcp {
|
||||
ctx.unique("http-headers", ctx.loc2pos(yystack_[0].location));
|
||||
ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location)));
|
||||
ctx.stack_.back()->set("http-headers", l);
|
||||
ctx.stack_.push_back(l);
|
||||
ctx.enter(ctx.HTTP_HEADERS);
|
||||
}
|
||||
#line 4182 "dhcp4_parser.cc"
|
||||
|
@ -2657,6 +2657,7 @@ http_headers: HTTP_HEADERS {
|
||||
ctx.unique("http-headers", ctx.loc2pos(@1));
|
||||
ElementPtr l(new ListElement(ctx.loc2pos(@1)));
|
||||
ctx.stack_.back()->set("http-headers", l);
|
||||
ctx.stack_.push_back(l);
|
||||
ctx.enter(ctx.HTTP_HEADERS);
|
||||
} COLON LSQUARE_BRACKET http_header_list RSQUARE_BRACKET {
|
||||
ctx.stack_.pop_back();
|
||||
@ -2690,13 +2691,13 @@ http_header_params: http_header_param
|
||||
;
|
||||
|
||||
http_header_param: name
|
||||
| value
|
||||
| header_value
|
||||
| user_context
|
||||
| comment
|
||||
| unknown_map_entry
|
||||
;
|
||||
|
||||
value: VALUE {
|
||||
header_value: VALUE {
|
||||
ctx.unique("value", ctx.loc2pos(@1));
|
||||
ctx.enter(ctx.NO_KEYWORD);
|
||||
} COLON STRING {
|
||||
|
@ -4331,6 +4331,7 @@ namespace isc { namespace dhcp {
|
||||
ctx.unique("http-headers", ctx.loc2pos(yystack_[0].location));
|
||||
ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location)));
|
||||
ctx.stack_.back()->set("http-headers", l);
|
||||
ctx.stack_.push_back(l);
|
||||
ctx.enter(ctx.HTTP_HEADERS);
|
||||
}
|
||||
#line 4337 "dhcp6_parser.cc"
|
||||
|
@ -2799,6 +2799,7 @@ http_headers: HTTP_HEADERS {
|
||||
ctx.unique("http-headers", ctx.loc2pos(@1));
|
||||
ElementPtr l(new ListElement(ctx.loc2pos(@1)));
|
||||
ctx.stack_.back()->set("http-headers", l);
|
||||
ctx.stack_.push_back(l);
|
||||
ctx.enter(ctx.HTTP_HEADERS);
|
||||
} COLON LSQUARE_BRACKET http_header_list RSQUARE_BRACKET {
|
||||
ctx.stack_.pop_back();
|
||||
@ -2832,13 +2833,13 @@ http_header_params: http_header_param
|
||||
;
|
||||
|
||||
http_header_param: name
|
||||
| value
|
||||
| header_value
|
||||
| user_context
|
||||
| comment
|
||||
| unknown_map_entry
|
||||
;
|
||||
|
||||
value: VALUE {
|
||||
header_value: VALUE {
|
||||
ctx.unique("value", ctx.loc2pos(@1));
|
||||
ctx.enter(ctx.NO_KEYWORD);
|
||||
} COLON STRING {
|
||||
|
Loading…
x
Reference in New Issue
Block a user