diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/mulk/benki/id.clj | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/mulk/benki/id.clj b/src/mulk/benki/id.clj index 4265945..56a86ee 100644 --- a/src/mulk/benki/id.clj +++ b/src/mulk/benki/id.clj @@ -137,13 +137,16 @@ (process-openid-request)) (defn render-profile-page [nickname] - (if (re-find #"application/xrds\+xml" - (get-in (request/ring-request) [:headers "accept"])) - (render-xrds nickname) - (show-profile-page (nickname-user nickname)))) + (let [accept (get-in (request/ring-request) [:headers "accept"])] + (if (and accept + (re-find #"application/xrds\+xml" + (get-in (request/ring-request) [:headers "accept"]))) + (render-xrds nickname) + (show-profile-page (nickname-user nickname))))) (defpage [:get "/id/:nickname"] {nickname :nickname} (render-profile-page nickname)) (defpage [:get "/~:nickname"] {nickname :nickname} (render-profile-page nickname)) + |