(20250221) Trying to resolve CORS problem in the MikroTik in Kenya.
This commit is contained in:
+4
-1
@@ -187,7 +187,10 @@ APP_VERSION = constants.APP_VERSION
|
|||||||
|
|
||||||
# The Quart app:
|
# The Quart app:
|
||||||
app = Quart(__name__, template_folder = r"../views_v2")
|
app = Quart(__name__, template_folder = r"../views_v2")
|
||||||
app = cors(app)
|
app = cors(
|
||||||
|
app,
|
||||||
|
allow_origin = ["wifi.hiranitelcom.co.ke"]
|
||||||
|
)
|
||||||
|
|
||||||
# Mail Blueprints:
|
# Mail Blueprints:
|
||||||
app.register_blueprint(mail_oauth_request_bp, url_prefix = f"/{MODULE_BASE}/mail")
|
app.register_blueprint(mail_oauth_request_bp, url_prefix = f"/{MODULE_BASE}/mail")
|
||||||
|
|||||||
@@ -21,7 +21,8 @@
|
|||||||
N/A
|
N/A
|
||||||
|
|
||||||
"""
|
"""
|
||||||
import datetime
|
|
||||||
|
|
||||||
# *****************************************************************************************************************
|
# *****************************************************************************************************************
|
||||||
# ***** ****
|
# ***** ****
|
||||||
# *** IMPORT ***
|
# *** IMPORT ***
|
||||||
@@ -53,6 +54,9 @@ from typing import List, Literal
|
|||||||
# To make API calls:
|
# To make API calls:
|
||||||
import httpx
|
import httpx
|
||||||
|
|
||||||
|
# To work with date and time:
|
||||||
|
import datetime
|
||||||
|
|
||||||
# To work with MongoDB:
|
# To work with MongoDB:
|
||||||
from bson import ObjectId
|
from bson import ObjectId
|
||||||
from pymongo import UpdateOne
|
from pymongo import UpdateOne
|
||||||
@@ -659,7 +663,7 @@ class CoreAuthTokenController(CoreBaseModel):
|
|||||||
# If there is some filtering possible, we fetch the token:
|
# If there is some filtering possible, we fetch the token:
|
||||||
token = await mongo_data_conn.find_one(
|
token = await mongo_data_conn.find_one(
|
||||||
collection = self.AUTH_COLLECTION,
|
collection = self.AUTH_COLLECTION,
|
||||||
filter = mongo_data_conn.dict_to_dot_notation(filter_json)
|
filter = filter_json
|
||||||
)
|
)
|
||||||
|
|
||||||
# Done here:
|
# Done here:
|
||||||
|
|||||||
Reference in New Issue
Block a user