Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OONI Auth and Run prod #883

Merged
merged 4 commits into from
Sep 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions api/ooniapi/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,7 @@ def validate_redirect_url(rt_url: str) -> Tuple[str, str]:
"explorer.ooni.org",
"explorer.test.ooni.org",
"run.ooni.io",
"run.ooni.org",
"run.test.ooni.org",
"run-v2.ooni.org",
"test-lists.ooni.org",
Expand Down
4 changes: 1 addition & 3 deletions ooniapi/services/ooniauth/src/ooniauth/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,9 @@ async def lifespan(app: FastAPI):
app, metric_namespace="ooniapi", metric_subsystem="ooniauth"
)

# TODO: temporarily enable all
origins = ["*"]
app.add_middleware(
CORSMiddleware,
allow_origins=origins,
allow_origin_regex="^https://[-A-Za-z0-9]+(\.test)?\.ooni\.(org|io)$",
allow_credentials=True,
allow_methods=["*"],
allow_headers=["*"],
Expand Down
1 change: 1 addition & 0 deletions ooniapi/services/ooniauth/src/ooniauth/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"explorer.ooni.org",
"explorer.test.ooni.org",
"run.ooni.io",
"run.ooni.org",
"run.test.ooni.org",
"run-v2.ooni.org",
"test-lists.ooni.org",
Expand Down
4 changes: 1 addition & 3 deletions ooniapi/services/oonifindings/src/oonifindings/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,9 @@ async def lifespan(app: FastAPI):
app, metric_namespace="ooniapi", metric_subsystem="oonifindings"
)

# TODO: temporarily enable all
origins = ["*"]
app.add_middleware(
CORSMiddleware,
allow_origins=origins,
allow_origin_regex="^https://[-A-Za-z0-9]+(\.test)?\.ooni\.(org|io)$",
allow_credentials=True,
allow_methods=["*"],
allow_headers=["*"],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,9 @@ async def lifespan(app: FastAPI):
app, metric_namespace="ooniapi", metric_subsystem="oonimeasurements"
)

# TODO: temporarily enable all
origins = ["*"]
app.add_middleware(
CORSMiddleware,
allow_origins=origins,
allow_origin_regex="^https://[-A-Za-z0-9]+(\.test)?\.ooni\.(org|io)$",
allow_credentials=True,
allow_methods=["*"],
allow_headers=["*"],
Expand Down
4 changes: 1 addition & 3 deletions ooniapi/services/ooniprobe/src/ooniprobe/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,9 @@ async def lifespan(app: FastAPI):
app, metric_namespace="ooniapi", metric_subsystem="ooniprobe"
)

# TODO: temporarily enable all
origins = ["*"]
app.add_middleware(
CORSMiddleware,
allow_origins=origins,
allow_origin_regex="^https://[-A-Za-z0-9]+(\.test)?\.ooni\.(org|io)$",
allow_credentials=True,
allow_methods=["*"],
allow_headers=["*"],
Expand Down
4 changes: 1 addition & 3 deletions ooniapi/services/oonirun/src/oonirun/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,9 @@ async def lifespan(app: FastAPI):
app, metric_namespace="ooniapi", metric_subsystem="oonirun"
)

# TODO: temporarily enable all
origins = ["*"]
app.add_middleware(
CORSMiddleware,
allow_origins=origins,
allow_origin_regex="^https://[-A-Za-z0-9]+(\.test)?\.ooni\.(org|io)$",
allow_credentials=True,
allow_methods=["*"],
allow_headers=["*"],
Expand Down
Loading