This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-06-14
Channels
- # beginners (31)
- # boot (9)
- # cider (10)
- # cljs-dev (9)
- # cljsrn (16)
- # clojure (222)
- # clojure-austin (4)
- # clojure-france (13)
- # clojure-italy (21)
- # clojure-nl (2)
- # clojure-russia (71)
- # clojure-spec (9)
- # clojure-uk (39)
- # clojurescript (50)
- # cursive (16)
- # datomic (69)
- # dirac (2)
- # figwheel (1)
- # graphql (19)
- # hoplon (4)
- # jobs (1)
- # klipse (3)
- # leiningen (4)
- # liberator (3)
- # luminus (9)
- # lumo (9)
- # off-topic (3)
- # om (21)
- # onyx (11)
- # parinfer (2)
- # pedestal (8)
- # planck (19)
- # re-frame (17)
- # reagent (12)
- # remote-jobs (1)
- # ring-swagger (3)
- # spacemacs (17)
- # specter (23)
- # sql (1)
- # unrepl (64)
- # untangled (19)
- # yada (5)
Hi! I have an issue: I'm not able to disable x-content-type-options
and x-xss-options
in the model:
(defn service
[config]
[""
[["/about" (as-resource "Hello World")]
["/register" (yada/resource {:access-control {:allow-origin "*"
:allow-headers "*"
:allow-credentials true
:allow-methods "*"}
:content-security-policy ""
; :x-content-type-options "0"
:x-frame-options "NONE"
; :x-xss-protection "0"
:methods {:get {:produces "text/event-stream"
:response yada-sse}}})]]])
when yada catches an exception of any kind (e.g. 404, 500), it appears that it completely resets the ctx
here:
https://github.com/juxt/yada/blob/master/src/yada/handler.clj#L134
this means that any additional data that interceptors added to the ctx
get lost.
is there any way to get around this for just a single interceptor ? i'm trying to measure latency between start and end of the whole request, and i'm storing the start time in the ctx...this gets lost this way