Skip to content

Commit e9be586

Browse files
Merge pull request #38 from drnextgis/cors-options
Add "OPTIONS" method to the list of allowed CORS methods
2 parents 66085ac + ac7ae10 commit e9be586

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

src/eoapi/features/eoapi/features/app.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
CORSMiddleware,
2525
allow_origins=settings.cors_origins,
2626
allow_credentials=True,
27-
allow_methods=["GET"],
27+
allow_methods=["GET", "OPTIONS"],
2828
allow_headers=["*"],
2929
)
3030

src/eoapi/raster/eoapi/raster/app.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def ping():
6363
CORSMiddleware,
6464
allow_origins=settings.cors_origins,
6565
allow_credentials=True,
66-
allow_methods=["GET", "POST"],
66+
allow_methods=["GET", "POST", "OPTIONS"],
6767
allow_headers=["*"],
6868
)
6969

src/eoapi/stac/eoapi/stac/app.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
CORSMiddleware,
5353
allow_origins=api_settings.cors_origins,
5454
allow_credentials=True,
55-
allow_methods=["GET", "POST"],
55+
allow_methods=["GET", "POST", "OPTIONS"],
5656
allow_headers=["*"],
5757
)
5858

src/eoapi/vector/eoapi/vector/app.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
CORSMiddleware,
2121
allow_origins=settings.cors_origins,
2222
allow_credentials=True,
23-
allow_methods=["GET", "POST"],
23+
allow_methods=["GET", "POST", "OPTIONS"],
2424
allow_headers=["*"],
2525
)
2626

0 commit comments

Comments
 (0)