Yet another attempt at fixing the Tomcat redirect issue.

This commit is contained in:
Simon Brooke 2020-03-03 08:19:30 +00:00
parent 6875abae84
commit 9f78718009
No known key found for this signature in database
GPG key ID: A7A4F18D1D4DF987
3 changed files with 9 additions and 2 deletions

2
.gitignore vendored
View file

@ -22,3 +22,5 @@ smeagol.log*
resources/public/content/uploads/
.eastwood
resources/public/content/Populating a game world.md

View file

@ -19,7 +19,7 @@
[image-resizer "0.1.10"]
[instaparse "1.4.10"]
[lib-noir "0.9.9" :exclusions [org.clojure/tools.reader]]
[markdown-clj "0.9.99" :exclusions [com.keminglabs/cljx]]
[markdown-clj "1.10.2"]
[me.raynes/fs "1.4.6"]
[noir-exception "0.2.5"]
[org.clojars.simon_brooke/internationalisation "1.0.3"]

View file

@ -162,7 +162,12 @@
;; If we're not inside a serlvet environment (for
;; example when using mock requests), then
;; .getContextPath might not exist
(try (.getContextPath context)
(try
(let [path (.getContextPath context)
path' (if-not (cs/ends-with? path "/")
(str path "/")
path)]
path')
(catch IllegalArgumentException _ context))))