-
Hello dear Joel! async Task MyHandler(HttpContext ctx) Note: I always execute Watson Web Server using address * (asterisk) |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hi Timur! Good to hear from you. I would use
Obviously this could be optimized in a number of ways: 1) pre-caching the result of Hope this helps! |
Beta Was this translation helpful? Give feedback.
Hi Timur! Good to hear from you. I would use
HttpContext.Request.Source
which includes anIpAddress
property. You can use a method like the below to indicate if the request came from localhost.Obviously this could be optimized in a number of ways: 1) pre-caching the result of
Dns.GetHostEntry(Dns.GetHostName())
into a variable and re-using it and 2) using LINQ to test if