// 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":
{
// 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":
{
// 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": {
// 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": {
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"
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();
;
http_header_param: name
- | value
+ | header_value
| user_context
| comment
| unknown_map_entry
ctx.leave();
};
-value: VALUE {
+header_value: VALUE {
ctx.unique("value", ctx.loc2pos(@1));
ctx.enter(ctx.NO_KEYWORDS);
} COLON STRING {
}
}
],
+ "http-headers": [
+ {
+ "name": "Strict-Transport-Security",
+ "user-context": {
+ "comment": "HSTS header"
+ },
+ "value": "max-age=31536000"
+ }
+ ],
"http-host": "127.0.0.1",
"http-port": 8000
}
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"
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();
;
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 {
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"
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();
;
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 {