mirror of
https://github.com/penpot/penpot.git
synced 2025-12-12 06:24:17 +01:00
🐛 Fix ip-addr parsing issue when it comes with port
This commit is contained in:
@@ -35,9 +35,13 @@
|
|||||||
|
|
||||||
(defn parse-client-ip
|
(defn parse-client-ip
|
||||||
[request]
|
[request]
|
||||||
(or (some-> (rreq/get-header request "x-forwarded-for") (str/split ",") first)
|
(let [ip-addr (or (some-> (rreq/get-header request "x-forwarded-for") (str/split ",") first)
|
||||||
(rreq/get-header request "x-real-ip")
|
(rreq/get-header request "x-real-ip")
|
||||||
(some-> (rreq/remote-addr request) str)))
|
(some-> (rreq/remote-addr request) str))
|
||||||
|
ip-addr (-> ip-addr
|
||||||
|
(str/split ":" 2)
|
||||||
|
(first))]
|
||||||
|
ip-addr))
|
||||||
|
|
||||||
(defn extract-utm-params
|
(defn extract-utm-params
|
||||||
"Extracts additional data from params and namespace them under
|
"Extracts additional data from params and namespace them under
|
||||||
|
|||||||
Reference in New Issue
Block a user