Spaces:
Running
Running
BinaryONe
commited on
Commit
·
3e95aa9
1
Parent(s):
f0a84e7
Cors Issue Test
Browse files
FileStream/server/routes_api.py
CHANGED
@@ -84,7 +84,7 @@ async def list_all_tmdb_tv_from_db(request):
|
|
84 |
#json_response = json.dumps(response).encode('utf-8')
|
85 |
# Return as aiohttp response using web.json_response
|
86 |
#return web.json_response(response)
|
87 |
-
return web.json_response(json.loads(dumps(response))
|
88 |
|
89 |
#api.router.add_get('/tmdb/list', list_all_files_tmdb)
|
90 |
async def list_all_files_tmdb(request):
|
@@ -230,7 +230,7 @@ async def stream_handler(request: web.Request):
|
|
230 |
api = web.Application()
|
231 |
|
232 |
cors = aiohttp_cors.setup(api, defaults={
|
233 |
-
|
234 |
"*": aiohttp_cors.ResourceOptions(
|
235 |
allow_credentials=False,
|
236 |
expose_headers="*",
|
|
|
84 |
#json_response = json.dumps(response).encode('utf-8')
|
85 |
# Return as aiohttp response using web.json_response
|
86 |
#return web.json_response(response)
|
87 |
+
return web.json_response(json.loads(dumps(response)),{'Access-Control-Allow-Origin' :'*'})
|
88 |
|
89 |
#api.router.add_get('/tmdb/list', list_all_files_tmdb)
|
90 |
async def list_all_files_tmdb(request):
|
|
|
230 |
api = web.Application()
|
231 |
|
232 |
cors = aiohttp_cors.setup(api, defaults={
|
233 |
+
'Access-Control-Allow-Origin' :'*',
|
234 |
"*": aiohttp_cors.ResourceOptions(
|
235 |
allow_credentials=False,
|
236 |
expose_headers="*",
|