bynk.http.security_invalid_field
Error A security policy field (hsts/nosniff) has the wrong value shape.
The fields of a security { } section are fixed at compile time and become response headers. hsts must be a positive Duration literal such as 180.days, because it is written as a max-age and a zero would clear the browser's HTTPS pin; a bare number has no unit. nosniff must be true or false. Write the value out. A field other than these two is bynk.http.security_unknown_field.
Example
service api from http { security { hsts: 180 } // ✗ a `Duration`, not a number 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_invalid_fieldshows the same from the installed toolchain, without a network.