This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-10-10
Channels
- # aleph (2)
- # arachne (1)
- # beginners (5)
- # boot (33)
- # cider (12)
- # cljs-dev (6)
- # cljsrn (26)
- # clojure (33)
- # clojure-austin (7)
- # clojure-belgium (6)
- # clojure-chicago (1)
- # clojure-dusseldorf (1)
- # clojure-fr (1)
- # clojure-hamburg (1)
- # clojure-nl (11)
- # clojure-portugal (3)
- # clojure-russia (14)
- # clojure-spec (35)
- # clojure-uk (28)
- # clojurescript (49)
- # component (7)
- # core-async (75)
- # cursive (13)
- # datomic (15)
- # dirac (57)
- # emacs (5)
- # events (1)
- # hoplon (34)
- # jobs (2)
- # jobs-discuss (8)
- # lambdaisland (1)
- # lein-figwheel (7)
- # leiningen (3)
- # om (5)
- # onyx (8)
- # re-frame (56)
- # reagent (13)
- # testing (7)
- # untangled (30)
- # vim (51)
- # yada (17)
Iām using Cursive, and it has the ability to launch the debugger, if an unhandled exception is thrown. However, Yada handles any exception by responding with HTTP 500. Can I change this behaviour so that I can use the debugger?
Can anyone point to a working example of a redirect resource? I keep getting an exception about no :uri-info
available in the context.
@jmglov Redirect only works if, when launching your yada handler something adds a :uri-info
key to the context.
I'm not actually serving multiple vhosts, however. This looks a little complicated for a simple redirect.
Read "I'm doing" as " @johanwiren's doing". š
@jmglov I believe the reason for this is down to differing requirements around full/partial/relative paths.
@jmglov Those requirements, I should add, are down to the HTTP spec ( I think ). But @malcolmsparks would have to clarify there.
https://github.com/juxt/bidi/blob/master/src/bidi/vhosts.clj#L120-L128 map should look like this
Like I said - easiest solution is just to use bidi.vhosts with the vhost coming from a config option of some kind.
the problem is if you're wanting to use yada/uri-for
in which case you should be using yada/server
. Otherwise, you can use bidi's path-for
function. The reason for this is that yada needs (sometimes) to generate absolute URIs as well as relative paths (as dictated by the spec.), so things are a little more complex. However, vhosts isn't hard to setup, and you can use a wildcard if you don't want to specify the host/port
@malcolmsparks In the case of wildcards, how are absolute paths generated?