diff --git a/src/calibre/srv/routes.py b/src/calibre/srv/routes.py index 6fd13021c3..4a0dc3bf73 100644 --- a/src/calibre/srv/routes.py +++ b/src/calibre/srv/routes.py @@ -17,7 +17,7 @@ default_methods = frozenset(('HEAD', 'GET')) def route_key(route): return route.partition('{')[0].rstrip('/') -def endpoint(route, methods=default_methods, types=None, auth_required=False, android_workaround=False): +def endpoint(route, methods=default_methods, types=None, auth_required=True, android_workaround=False): def annotate(f): f.route = route.rstrip('/') or '/' f.types = types or {} diff --git a/src/calibre/srv/tests/auth.py b/src/calibre/srv/tests/auth.py index f309b04172..1147d592e2 100644 --- a/src/calibre/srv/tests/auth.py +++ b/src/calibre/srv/tests/auth.py @@ -14,7 +14,7 @@ from calibre.srv.routes import endpoint, Router REALM = 'calibre-test' -@endpoint('/open') +@endpoint('/open', auth_required=False) def noauth(ctx, data): return 'open'