Skip to content

Commit 35a88ce

Browse files
try regex for front end PR cors
1 parent 0916a4d commit 35a88ce

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

start.py

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import os
21
from flask import Flask
32
from flask_cors import cross_origin
43
from flask_restful import Api
@@ -9,16 +8,10 @@
98

109
allowed_origins = [
1110
"https://slacker-news-frontend.onrender.com",
11+
r"(https:\/\/slacker-news-frontend-pr-)[0-9]+.onrender.com",
1212
"http://localhost*",
1313
]
1414

15-
render_url = os.getenv("RENDER_EXTERNAL_URL")
16-
17-
if render_url:
18-
allowed_origins.append(render_url)
19-
print(render_url)
20-
21-
2215
session = init_postgres()
2316
app = Flask(__name__)
2417
api = Api(app)

0 commit comments

Comments
 (0)