1
0
mirror of https://github.com/Mailu/Mailu.git synced 2024-12-16 10:59:53 +02:00
Mailu/admin/mailu/internal/views.py

16 lines
414 B
Python
Raw Normal View History

from mailu import db, models
from mailu.internal import internal, nginx
import flask
2017-10-22 16:43:06 +02:00
@internal.route("/auth/email")
def nginx_authentication():
2017-10-22 16:43:06 +02:00
""" Main authentication endpoint for Nginx email server
"""
headers = nginx.handle_authentication(flask.request.headers)
response = flask.Response()
for key, value in headers.items():
response.headers[key] = str(value)
return response