Closed MutableR closed 10 months ago
Hi,
See the readme section on adding interceptors: https://github.com/oliyh/martian#global-behaviour
In your case, you can set the field on the request map (the request map is given to clj-http):
(def ignore-invalid-cookies
{:name ::ignore-invalid-cookies
:enter (fn [ctx]
(assoc-in ctx [:request :cookie-policy] :none))})
Hope this helps!
@oliyh It works! Thank you. I use interceptors, but it didn't seem obvious to me as a user.
Perhaps this should be included in the documentation (my own opinion) or add more examples of usage. Perhaps someone will come across such a question too and will look for a solution as I did before I wrote to the issue.
@oliyh Your library is great, I enjoy using it. But it was nice to see more examples or use cases. Thank you for your hard work.
I have this error:
"Msg": "Invalid cookie header: \"Set-Cookie: **** ; Path=/; Domain=****; Expires=Thu, 10 Aug 2023 10:14:39 GMT; HttpOnly; Secure\". Invalid 'expires' attribute: Thu, 10 Aug 2023 10:14:39 GMT"
I remember this error fixed in clj-http setting
:cookie-policy: none
and/or:decode-cookies false
in client. How can I change the cookie policy or disable the cookie decode in martian?