0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-03-10 14:51:37 -05:00

🐛 Properly send 403 on not authorized request.

This commit is contained in:
Andrey Antukh 2019-12-20 22:54:58 +01:00
parent dabbbc2e09
commit fee2eea87c

View file

@ -56,7 +56,7 @@
(spx/terminate (assoc data ::unauthorized true)))))
(vc/handle-on-context))))
:leave (fn [data]
(if (and (::unauthorized data) (:response data))
(if (::unauthorized data)
(update data :response
assoc :status 403 :body {:type :authentication
:code :unauthorized})