From c11b231c712099175b3dea9c70f76b1fb81f56ad Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Sun, 1 Aug 2021 10:40:28 +0200 Subject: [PATCH] fdfd --- drama/__main__.py | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/drama/__main__.py b/drama/__main__.py index 632d3881d..0f9e8d434 100644 --- a/drama/__main__.py +++ b/drama/__main__.py @@ -118,21 +118,20 @@ Compress(app) class CorsMatch(str): def __eq__(self, other): - return True - # if isinstance(other, str): - # if other in ['https://rdrama.net', f'https://{app.config["SERVER_NAME"]}']: - # return True + if isinstance(other, str): + if other in ['https://rdrama.net', f'https://{app.config["SERVER_NAME"]}']: + return True - # elif other.endswith(".rdrama.net"): - # return True + elif other.endswith(".rdrama.net"): + return True - # elif isinstance(other, list): - # if f'https://{app.config["SERVER_NAME"]}' in other: - # return True - # elif any([x.endswith(".rdrama.net") for x in other]): - # return True + elif isinstance(other, list): + if f'https://{app.config["SERVER_NAME"]}' in other: + return True + elif any([x.endswith(".rdrama.net") for x in other]): + return True - # return False + return False