How do I CORS?

Get help using Construct 2

Post » Sat Sep 26, 2015 9:56 pm

zenox98 wrote:If it was that easy for an application to bypass such an important server security then surely that would make the whole concept of CORS pointless, surely.


Image

zenox98 wrote:It seams to me that you want to set CORS from C2...


Yes :)
... that it was my intention...somehow "inject" CORS from C2...
B
66
S
24
G
7
Posts: 1,515
Reputation: 11,041

Post » Sat Sep 26, 2015 10:35 pm

You can't do that in C2, and you can't do that in any javascript application because at this moment when the javascript is executed, it's too late and you can't intercept and modify the header sent by the server to allow CORS.
The chrome extension is working because it can intercept the header and modify it before it is parsed by the browser.

In fact, what do you want to do with that ? If you want to access a server on an other domain you own, you can configure the server to allow CORS.
B
13
S
3
G
4
Posts: 72
Reputation: 3,455

Previous

Return to How do I....?

Who is online

Users browsing this forum: Bobbyneal100, Euduardo, Kin, mickclarke, tinhofiel, TRMG, usochi and 43 guests