Added github integration
This commit is contained in:
@@ -0,0 +1 @@
|
||||
"""Contributed 'recipes'"""
|
||||
@@ -0,0 +1,12 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from flask import request
|
||||
|
||||
|
||||
def get_remote_address_cloudflare() -> str:
|
||||
"""
|
||||
:return: the ip address for the current request from the CF-Connecting-IP header
|
||||
(or 127.0.0.1 if none found)
|
||||
|
||||
"""
|
||||
return request.headers["CF-Connecting-IP"] or "127.0.0.1"
|
||||
Reference in New Issue
Block a user