Open cloudfysystems opened 5 years ago
Hello,
I need to pass CORS headers into the OPTIONS request. Chrome block the request before it can get into the plugin:
`(window).webserver.onRequest( function (request) { debugger; console.log("O MA GAWD! This is the request: ", request);
(<any>window).webserver.sendResponse( request.requestId, { status: 200, body: '<html>Hello World</html>', headers: { 'content-type': 'text/html', "Access-Control-Allow-Origin": "*", "Access-Control-Allow-Headers" : "content-type,transaction", "Access-Control-Allow-Methods" : "GET,HEAD,PUT,PATCH,POST,DELETE" } } ); } );`
Is there any way to implement it?
@cloudfysystems Its been months, have you got any solution? I really need to know! I'm using ionic 4.
Hello,
I need to pass CORS headers into the OPTIONS request. Chrome block the request before it can get into the plugin:
`(window).webserver.onRequest(
function (request) {
debugger;
console.log("O MA GAWD! This is the request: ", request);
Is there any way to implement it?