How to whitelist an URL in servicenow?

Somnath Dhar
ServiceNow Employee
ServiceNow Employee

I have this query to check in Script background whether the connection is returning anything.

 

var url = "https://install.service-now.com";
var request = new sn_ws.RESTMessageV2();
request.setEndpoint(url);
request.setHttpMethod('get');
request.setRequestHeader('Content-Type', 'application/json');
var response = request.execute();
var statusCode = response.getStatusCode();
if(statusCode == '200'){
gs.info("SUCCESS");
}

 

 

output: 
Security restricted: Access to install.service-now.com is blocked because it is on the blacklist.


Please help how to whitelist URLs in servicenow lab?
Is there any sys properties for the same?

2 REPLIES 2

Maik Skoddow
Tera Patron
Tera Patron

Please explain first your issue and why you want to request install.servicenow.com.

Then we can check how to help you.

Maik

kunal20
Kilo Guru

Hi,

The URL you have used is not a valid one https://install.service-now.com,use the code below and it will return success.

var url = "https://www.google.co.in/";
var request = new sn_ws.RESTMessageV2();
request.setEndpoint(url);
request.setHttpMethod('get');
request.setRequestHeader('Content-Type', 'application/json');
var response = request.execute();
var statusCode = response.getStatusCode();
if(statusCode == '200'){
gs.info("SUCCESS");
}

Kindly mark this as helpful