Skip to content

Commit ebce575

Browse files
Update integration_fastapi.py (#357)
Correct usage of fnmatch for ignoring some paths Fixes #356 . Signed-off-by: Berengar W. Lehr <Berengar.Lehr@uni-jena.de>
1 parent 1e667d4 commit ebce575

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

nc_py_api/ex_app/integration_fastapi.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ async def __call__(self, scope: Scope, receive: Receive, send: Send) -> None:
247247

248248
conn = HTTPConnection(scope)
249249
url_path = conn.url.path.lstrip("/")
250-
if not fnmatch.filter(self._disable_for, url_path):
250+
if not any(fnmatch.fnmatch(url_path, i) for i in self._disable_for):
251251
try:
252252
scope["username"] = _request_sign_check(conn, AsyncNextcloudApp())
253253
except HTTPException as exc:

0 commit comments

Comments
 (0)