Open valerauko opened 1 week ago
@bsless, ideas on this?
I was afraid of this, where someone might get clever with types and I missed it in my extend / dispatch. I'll pull Aleph in and check what I missed
@valerauko I have a fix and I tested it locally with Aleph headers and got the expected results, but if you could check out the patch and test it with your code it will be additional verification of this fix's correctness
No problem, but I won't be able to check until Wednesday
@valerauko any update?
Might be a regression introduced by #506 ?
aleph headers are potemkin magical maps where keys can be accessed both as strings and as keywords.
With a reitit route that has
:parameters {:header {:authorization (,,, spec-tools spec for Bearer ,,,)}}
and:coercion spec-coercion/coercion
, with 0.7.1coercion/coerce-request-middleware
works as expected and valid requests pass.However with 0.7.2 this no longer works failing with "Request coercion failed". In 0.7.2 if you add a middleware like below it once again works as expected, so I suspected it might be some optimizations in #506 clashing with aleph's (potemkin's) custom map types.