Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using UrlRewriter triggers DNS reverse resolution of the remote host #9

Open
jocutajar opened this issue Aug 16, 2016 · 0 comments
Open

Comments

@jocutajar
Copy link

Hi,

Refer to SO for further context.

I identified this code in RewriteContext as the culprit:

            // Initialise the Properties collection from all the server variables, headers and cookies.
            foreach (string key in httpContext.ServerVariables.AllKeys)
            {
                _properties.Add(key, httpContext.ServerVariables[key]);
            }

REMOTE_HOST is a dynamic property that gets calculated only on access. Here UrlRewriter makes a copy of all server variables, triggering DNS requests even if not used anywhere in the app or rewriting rules.

Cheers, Rob

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant