Fork me on GitHub
#pedestal
<
2021-11-11
>
simongray12:11:45

Did anybody here ever write a language negotiation interceptor/rewrite the content negotiation interceptor to support languages? i.e. https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept-Language

Fredrik18:11:47

The argument :content-param-paths specifies where to look for the "Accept" header. If you set it to [:request :headers "accept-language"] , and change this line to store the negotiation result in the correct place, you should be good. https://github.com/pedestal/pedestal/blob/d20065013abf5d3793ae5301e18a2398707fa2a9/service/src/io/pedestal/http/content_negotiation.clj#L186