@@ -214,13 +214,9 @@ async def status_check_fastapi(request: web.Request, vm_id: Optional[ItemHash] =
214214                    # "ipv6": await status.check_ipv6(session), 
215215                }
216216
217-             return  web .json_response (
218-                 result , status = 200  if  all (result .values ()) else  503 , headers = {"Access-Control-Allow-Origin" : "*" }
219-             )
217+             return  web .json_response (result , status = 200  if  all (result .values ()) else  503 )
220218    except  aiohttp .ServerDisconnectedError  as  error :
221-         return  web .json_response (
222-             {"error" : f"Server disconnected: { error }  }, status = 503 , headers = {"Access-Control-Allow-Origin" : "*" }
223-         )
219+         return  web .json_response ({"error" : f"Server disconnected: { error }  }, status = 503 )
224220
225221
226222@cors_allow_all  
@@ -246,7 +242,7 @@ async def status_check_host(request: web.Request):
246242        },
247243    }
248244    result_status  =  200  if  all (result ["ipv4" ].values ()) and  all (result ["ipv6" ].values ()) else  503 
249-     return  web .json_response (result , status = result_status ,  headers = { "Access-Control-Allow-Origin" :  "*" } )
245+     return  web .json_response (result , status = result_status )
250246
251247
252248@cors_allow_all  
@@ -260,7 +256,7 @@ async def status_check_ipv6(request: web.Request):
260256            vm_ipv6  =  False 
261257
262258    result  =  {"host" : await  check_host_egress_ipv6 (), "vm" : vm_ipv6 }
263-     return  web .json_response (result ,  headers = { "Access-Control-Allow-Origin" :  "*" } )
259+     return  web .json_response (result )
264260
265261
266262@cors_allow_all  
@@ -283,7 +279,6 @@ async def status_check_version(request: web.Request):
283279        return  web .Response (
284280            status = 200 ,
285281            text = f"Up-to-date: version { current } { reference }  ,
286-             headers = {"Access-Control-Allow-Origin" : "*" },
287282        )
288283    else :
289284        return  web .HTTPForbidden (text = f"Outdated: version { current } { reference }  )
@@ -327,7 +322,6 @@ async def status_public_config(request: web.Request):
327322            },
328323        },
329324        dumps = dumps_for_json ,
330-         headers = {"Access-Control-Allow-Origin" : "*" },
331325    )
332326
333327
@@ -436,9 +430,7 @@ async def notify_allocation(request: web.Request):
436430    except  JSONDecodeError :
437431        return  web .HTTPBadRequest (reason = "Body is not valid JSON" )
438432    except  ValidationError  as  error :
439-         return  web .json_response (
440-             data = error .json (), status = web .HTTPBadRequest .status_code , headers = {"Access-Control-Allow-Origin" : "*" }
441-         )
433+         return  web .json_response (data = error .json (), status = web .HTTPBadRequest .status_code )
442434
443435    pubsub : PubSub  =  request .app ["pubsub" ]
444436    pool : VmPool  =  request .app ["vm_pool" ]
0 commit comments