diff options
| author | tim b <timb@camcompu.home> | 2010-07-03 15:57:23 -0700 |
|---|---|---|
| committer | tim b <timb@camcompu.home> | 2010-07-03 15:57:23 -0700 |
| commit | 87164f2e59a9018f601ef4c375f3c2e241c45d51 (patch) | |
| tree | 80c24acffcde2ca6710972bdfafe0d14b31a552a /src/site.clj | |
| parent | 0ec565e741daeeda5f5ee461ba122b7dafcc33c6 (diff) | |
testing how to get ip from request obj
Diffstat (limited to 'src/site.clj')
| -rw-r--r-- | src/site.clj | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/site.clj b/src/site.clj index 1405ff8..2ce42ea 100644 --- a/src/site.clj +++ b/src/site.clj @@ -1103,7 +1103,8 @@ order by count desc limit ? offset ?") (.toString st))) (defn show-ip [request] - (str request (:headers request)) + (let [ip (:x-real-ip (:headers request)) + ip (if ip ip (:remote-addr request))] (str ip)) ) ;; Compojure Routes |
