mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
Fix for OPTIONS request against /db, closes #1100
This commit is contained in:
parent
daae35be46
commit
a45a3dff3e
3 changed files with 30 additions and 1 deletions
|
|
@ -155,7 +155,7 @@ class DataView(BaseView):
|
|||
name = ""
|
||||
re_named_parameter = re.compile(":([a-zA-Z0-9_]+)")
|
||||
|
||||
def options(self, request, *args, **kwargs):
|
||||
async def options(self, request, *args, **kwargs):
|
||||
r = Response.text("ok")
|
||||
if self.ds.cors:
|
||||
r.headers["Access-Control-Allow-Origin"] = "*"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue