agent-0 / patch_security2.py
Leon4gr45's picture
Upload folder using huggingface_hub
d41d524 verified
Raw History Blame Contribute Delete
345 Bytes
with open("ocr/http_security.py", "r") as f:
content = f.read()
content = content.replace('if not any(path.endswith(p) for p in ("/health", "/api-docs", "/docs", "/openapi.json", "/redoc")):', 'if path not in ("/health", "/api-docs", "/docs", "/openapi.json", "/redoc"):')
with open("ocr/http_security.py", "w") as f:
f.write(content)