A security scan of our IIS 10 server revealed that it's disclosing the internal IP address of the server via the Location
header when a request is made to a folder, such as https://example.org/Content
. This generates the following (xxx
represents the internal IP):
HTTP/1.1 301 Moved Permanently
Cache-Control: no-cache, no-store, must-revalidate
Pragma: no-cache
Content-Type: text/html; charset=UTF-8
Expires: -1
Location: https://xxx.xxx.xxx.xxx/Content/
....
A few questions:
- What's the best practice on fixing this?
- How do we do a GET HTTP/1.0 request outside of the scanning software to simulate this and test it after the fix?
Thank you.
Update: tried the URL Rewrite rule from this post but it throws a 500 error.