mirror of
https://github.com/Mailu/Mailu.git
synced 2025-03-17 20:57:54 +02:00
Avoid blacklisting the webmail
This commit is contained in:
parent
e625bc9adb
commit
baff8dd043
@ -1,6 +1,19 @@
|
||||
from flask import Blueprint
|
||||
from mailu import limiter
|
||||
|
||||
import socket
|
||||
import flask
|
||||
|
||||
|
||||
internal = Blueprint('internal', __name__)
|
||||
internal = flask.Blueprint('internal', __name__)
|
||||
|
||||
|
||||
@limiter.request_filter
|
||||
def whitelist_webmail():
|
||||
try:
|
||||
return flask.request.headers["Client-Ip"] ==\
|
||||
socket.gethostbyname("webmail")
|
||||
except:
|
||||
return False
|
||||
|
||||
|
||||
from mailu.internal import views
|
||||
|
Loading…
x
Reference in New Issue
Block a user