Skip to content
Playground(another site)

bynk.http.security_unknown_field

Error A security { } policy declares a field outside the closed set.

A security { } section has two fields, hsts and nosniff, and each becomes a response header. The set is closed, so a misspelt or invented field is refused rather than ignored, which would leave the service sending headers you did not intend; no other header is set from this section. Rename the field or remove it. A field with a bad value is bynk.http.security_invalid_field.

Example

service api from http {
security { hsts: 180.days, frameOptions: "DENY" } // ✗ `hsts` and `nosniff` only
on GET("/items") () -> Effect[HttpResult[String]] by v: Visitor { … }
}
service api from http {
security { hsts: 180.days } // ✓
on GET("/items") () -> Effect[HttpResult[String]] by v: Visitor { … }
}

In the Book

See also

  • Every code in its category, HTTP, on the diagnostic index.
  • bynk explain bynk.http.security_unknown_field shows the same from the installed toolchain, without a network.