Closed LunaFolf closed 1 year ago
I agree, this will be good
In Ets2TelemetryController.cs
there is a HttpResponseMessage
called Get()
just insert this line: response.Headers.Add("Access-Control-Allow-Origin", "*");
after response.Headers.CacheControl = new CacheControlHeaderValue { NoCache = true };
and rebuild the project and publish it to a folder.
Hello,
Please, can you reopen this issue ?
I am currently developing a PWA in VueJS, in order to display data on my phone under the same local network and I encounter CORS error.
I tried javacript "fetch()" API, "axios" node module, and also load url into an
It is possible @LunaFolf 's suggestion will work.
Hi, I've downloaded and set up the server with no issue and everything works great, however when I try to grab the JSON response from the API I receive a No 'Access-Control-Allow-Origin' error, I took a look at the code to see if I could manually tweak it (just adding
a Access-Control-Allow-Origin: *
header should probably be enough) but I got lost.Regards, LH