Merge 282c630eb8
into 0b2ad520b7
This commit is contained in:
commit
5ca6c9545b
|
@ -1,7 +1,7 @@
|
||||||
import base64
|
import base64
|
||||||
import binascii
|
import binascii
|
||||||
from functools import wraps
|
from functools import wraps
|
||||||
from flask import g, request, abort, current_app, render_template
|
from flask import g, request, abort, current_app, Response
|
||||||
from flask_login import current_user
|
from flask_login import current_user
|
||||||
|
|
||||||
from .models import User, ApiKey, Setting, Domain, Setting
|
from .models import User, ApiKey, Setting, Domain, Setting
|
||||||
|
@ -409,7 +409,7 @@ def dyndns_login_required(f):
|
||||||
@wraps(f)
|
@wraps(f)
|
||||||
def decorated_function(*args, **kwargs):
|
def decorated_function(*args, **kwargs):
|
||||||
if current_user.is_authenticated is False:
|
if current_user.is_authenticated is False:
|
||||||
return render_template('dyndns.html', response='badauth'), 200
|
return Response(headers={'WWW-Authenticate': 'Basic'}, status=401)
|
||||||
return f(*args, **kwargs)
|
return f(*args, **kwargs)
|
||||||
|
|
||||||
return decorated_function
|
return decorated_function
|
||||||
|
|
Loading…
Reference in a new issue