Embedding ServiceNow pages using iFrames on external websites

sanjeevkumar
Tera Contributor

We are working on ServiceNow External survey for customer. For security reasons, we can’t disclose ServiceNow URL to customer. To hide the ServiceNow URL, we are using below steps.

 

We have created new application(Angular page) which is hosted on the server.
Iframe will be embedded on this new page that open the ServiceNow survey URL.
When user clicks on link, new server URL will open and that URL will contains the SNOW survey Instance ID. And then we will pass the survey instance ID from the URL to the iframe.

 

While implementing this solution we are facing CORS (strict-origin-when-cross-origin) issue. Application is not able to connect to ServiceNow because CORS (strict-origin-when-cross-origin) issue. Please let us know how we can fix it.

1 ACCEPTED SOLUTION

Kieran Anson
Kilo Patron

Have you ruled out using a custom URL rather than embedding the SN webpage inside another application? This seems like technical debt. 

 

Response headers, such as CORS, can be set using the following documentation 

 

https://docs.servicenow.com/bundle/xanadu-servicenow-platform/page/administer/http-response-headers/...

View solution in original post

3 REPLIES 3

Kieran Anson
Kilo Patron

Have you ruled out using a custom URL rather than embedding the SN webpage inside another application? This seems like technical debt. 

 

Response headers, such as CORS, can be set using the following documentation 

 

https://docs.servicenow.com/bundle/xanadu-servicenow-platform/page/administer/http-response-headers/...

Thank you @Kieran Anson for your input, I created "Response headers" and it is working.

I’ve already added the HTTP response headers as outlined in the documentation, but I’m still not having any luck. I’m trying to add external links to my UI Page and have made adjustments in the iframe along with configuring CORS rules, but the issue persists.