How to whitelist an URL in servicenow?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-25-2022 04:28 AM
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-25-2022 04:33 AM
Please explain first your issue and why you want to request install.servicenow.com.
Then we can check how to help you.
Maik
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-25-2022 04:35 AM
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