cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
527
Views
0
Helpful
0
Replies

How to enable Localhost support for Macro on https GET or PUT requests

greggie999
Level 1
Level 1

Hi TEam,

 

I have a specalist macro use case requiring HttpClient Get/Post to/from the localhost however Localhost is not allowed as per the error messages below which is blocking. 

 

Is there away Localhost support can be enabled to meet this use case?

 

Macro syntax is:

xapi.command('HttpClient Get', { 'Header': [AUTHTOKEN, CONTENT_TYPE, ACCEPT_TYPE] , 'Url': 'https://10.10.10.10/status.xml', 'AllowInsecureHTTPS': 'True'});
 

Adding "Localhost", "127.0.0.1" or the specific IP address has no effect

e.g. xCommand HttpClient Allow Hostname Add Expression: 10.10.10.10
 

Macro Error: HTTP Get Macro>'Unhandled promise rejection' { code: 1, message: 'Localhost is not allowed' }

 

Log Output: XapiCmd I: HTTP command from user macros/HTTP.Get.Macro/'localhost': failed condition: Localhost is not allowed

0 Replies 0