Skip to content

Commit

Permalink
Bugfix: wasn't accessing x-forwarded-for correctly.
Browse files Browse the repository at this point in the history
  • Loading branch information
Brian Carper committed May 3, 2009
1 parent a7f358a commit 6e8ae17
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions net/briancarper/blog/html/forms.clj
Expand Up @@ -137,7 +137,7 @@
(:author global/*param*))
:homepage (:homepage global/*param*)
:post_id (:post_id global/*param*)
:ip (or (:x-forwarded-for (:headers *request*))
:ip (or ((:headers global/*request*) "x-forwarded-for")
(:remote-addr *request*))
:approved 1})
[(message "Comment added.")
Expand All @@ -150,7 +150,7 @@
(try
(add-spam (assoc (dissoc global/*param* :id)
:post_id (:id post)
:ip (or (:x-forwarded-for (:headers *request*))
:ip (or ((:headers global/*request*) "x-forwarded-for")
(:remote-addr *request*))))
(catch Exception e))
[(error-message "Comment failed. You didn't type the magic word. :(")
Expand Down

0 comments on commit 6e8ae17

Please sign in to comment.