Add CORS class
This commit is contained in:
11
slow/slow.py
11
slow/slow.py
@@ -9,6 +9,17 @@ from typing import Any, Awaitable, Callable, Optional
|
|||||||
PR = re.compile(r"\<([a-zA-Z_][a-zA-Z0-9_]*)\>")
|
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:
|
class Headers:
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self._d: dict[str, str] = {}
|
self._d: dict[str, str] = {}
|
||||||
|
|||||||
Reference in New Issue
Block a user