fix cors origin

This commit is contained in:
Cayo Puigdefabregas 2024-11-28 16:37:38 +01:00
parent a2d859494b
commit 6c0e77891f

View file

@ -84,7 +84,9 @@ class PublicDeviceWebView(TemplateView):
def get_json_response(self):
device_data = self.get_result()
# device_data = self.get_device_data()
return JsonResponse(device_data)
response = JsonResponse(device_data)
response["Access-Control-Allow-Origin"] = "*"
return response
def get_result(self):
components = []