Skip to content
Browse files

Bugfix: wasn't accessing x-forwarded-for correctly.

  • Loading branch information...
1 parent a7f358a commit 6e8ae1768c4f735e294caf80951f14bbeaa64407 Brian Carper committed
Showing with 2 additions and 2 deletions.
  1. +2 −2 net/briancarper/blog/html/forms.clj
View
4 net/briancarper/blog/html/forms.clj
@@ -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.")
@@ -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. :(")

0 comments on commit 6e8ae17

Please sign in to comment.
Something went wrong with that request. Please try again.