Sorry about your question going unanswered for a few days. This is fairly straightforward, and it involves three features: placeholders, the rewrite directive, and the status directive.
The latter lets you define an arbitrary status response for a given URI, which you can rewrite the request to if the method is not allowed.
example.com {
rewrite {
if {method} not GET
to /method_not_allowed
}
status 405 /method_not_allowed
}