Add CORS class

This commit is contained in:
0880
2026-01-17 18:12:18 +03:30
parent 9947e2b429
commit 83353522db

View File

@@ -9,6 +9,17 @@ from typing import Any, Awaitable, Callable, Optional
PR = re.compile(r"\<([a-zA-Z_][a-zA-Z0-9_]*)\>")
class CORS:
Origins: list[str]
Methods: list[str]
Disabled: bool
def __init__(self):
self.Disabled = False
self.Origins = []
self.Methods = ["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD"]
class Headers:
def __init__(self):
self._d: dict[str, str] = {}