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