Hi people, could I get a hand with CORS please? I ...
# suitescript
d
Hi people, could I get a hand with CORS please? I get the following error when submitting a form from an iframe that is loading a Suitelet. The suitelet POST response is set to response.write(stHTMLFileContents);
Copy code
Access to XMLHttpRequest at '<https://forms.na2.netsuite.com/app/site/hosting/scriptlet.nl>' from origin '<https://accountid.extforms.netsuite.com>' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
I've tried the following before writing to the response.
Copy code
response.addHeader('Content-Security-Policy', "child-src 'self' <https://accountid.extforms.netsuite.com>;frame-src 'self' <https://accountid.extforms.netsuite.com>");