Skip to content
Snippets Groups Projects
Commit 73af8193 authored by ale's avatar ale
Browse files

nginx auth should be served on /

parent 4b5ac2ad
No related branches found
No related tags found
No related merge requests found
......@@ -6,7 +6,7 @@ app = Flask(__name__)
_default_port_map = {'imap': 143, 'pop3': 110}
@app.route('/auth', methods=('GET',))
@app.route('/', methods=('GET',))
def do_nginx_http_auth():
service = app.config.get('NGINX_AUTH_SERVICE', 'mail')
username = request.environ.get('HTTP_AUTH_USER')
......
......@@ -4,8 +4,6 @@ from authserv import protocol
from authserv import server
from authserv import app_nginx
URL = '/api/1/auth'
class ServerTest(unittest.TestCase):
......@@ -27,7 +25,7 @@ class ServerTest(unittest.TestCase):
def test_nginx_http_auth_ok(self):
response = self.app.get(
'/auth', headers={
'/', headers={
'Auth-User': 'user',
'Auth-Pass': 'pass',
'Client-IP': '127.0.0.1',
......@@ -39,7 +37,7 @@ class ServerTest(unittest.TestCase):
def test_nginx_http_auth_fail(self):
response = self.app.get(
'/auth', headers={
'/', headers={
'Auth-User': 'user',
'Auth-Pass': 'bad password',
'Client-IP': '127.0.0.1',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment