reitit

gtbono 2024-12-28T20:00:10.070399Z

folks, I am using plumatic schema to validate my reitit route body parameters, is it possible to validate a header too? I want to ensure that my authorization header is a non-empty string

opqdonut 2025-01-08T08:26:32.047579Z

coercion works for all :parameters, even :headers

opqdonut 2025-01-08T08:27:17.755719Z

we might not have an example of this, but it works in exactly the same way as :query parameter coercion

👀 1
ikitommi 2025-01-08T16:55:58.889269Z

Please check the tests: https://github.com/metosin/reitit/blob/master/test/cljc/reitit/ring_coercion_test.cljc

Saket 2025-01-02T07:10:29.731329Z

You probably want to validate it in a middleware.