From 83353522db78dce91fa922eab93418cd96f03bdd Mon Sep 17 00:00:00 2001 From: 0880 <98263509+0880880@users.noreply.github.com> Date: Sat, 17 Jan 2026 18:12:18 +0330 Subject: [PATCH] Add CORS class --- slow/slow.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/slow/slow.py b/slow/slow.py index 1e6a8f9..6179782 100644 --- a/slow/slow.py +++ b/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_]*)\>") +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] = {}