browser - how to get client Ip address when the request is made from javascript -


i want client ip address makes request site. here code this:

 var w2 = httpcontext.request.userhostaddress;  var w3 = this.request.userhostaddress; 

this works fine when request comes browser. when request comes javascript don't results excpected.

here javascript requset:

<script src="http://localhost:55866/dashboard/getcampine?mediaid=21&productstypid=5 ">      </script> 

that get: w3=::1 w2=::1


Comments

Popular posts from this blog

java - Run spring boot application error: Cannot instantiate interface org.springframework.context.ApplicationListener -

reactjs - React router and this.props.children - how to pass state to this.props.children -

Excel VBA "Microsoft Windows Common Controls 6.0 (SP6)" Location Changes -