You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using Buddy with Basic Auth and the api-defaults Ring middleware. The Unauthorized response gets a Content-Type of octet-stream. In a (Safari) browser, this results in an empty file being downloaded on Esc from the Basic Auth dialog.
I'm looking for a way to set Content-Type to say text/plain, but without having to re-create the same response as Buddy Auth. The only solution now seems to be to create a full response myself in the :on-error function.
The text was updated successfully, but these errors were encountered:
Hmm, buddy by default does not set any header on the response, so the responsible to set that content-type header is something else. And yes, the proper way to fix it is just passing the :unauthorized-handler with function that handles that and returns appropriate response for your use case.
I don't think that adding an additional and specific parameter to the auth backend that will allow set a content-type header is a good solution for that problem. But I'm open to discussion ;)
I'm using Buddy with Basic Auth and the
api-defaults
Ring middleware. The Unauthorized response gets aContent-Type
ofoctet-stream
. In a (Safari) browser, this results in an empty file being downloaded on Esc from the Basic Auth dialog.I'm looking for a way to set
Content-Type
to saytext/plain
, but without having to re-create the same response as Buddy Auth. The only solution now seems to be to create a full response myself in the:on-error
function.The text was updated successfully, but these errors were encountered: