Skip to content

Instantly share code, notes, and snippets.

@davidfowl
Created January 17, 2013 20:29
Show Gist options
  • Save davidfowl/4559450 to your computer and use it in GitHub Desktop.
Save davidfowl/4559450 to your computer and use it in GitHub Desktop.
Generate urls properly on appharbor.
<appSettings>
<add key="aspnet:UseHostHeaderForRequestUrl" value="true"/>
</appSettings>
@khalidabuhakmeh
Copy link

That's really cool. I didn't know that even existed.

@robinbihun
Copy link

Correct me if i'm wrong, but this still will not work for accessing the Request.Url property directly, so appharbor's code snippet is still valid for class libraries that may do something like log the Request URL for example (or attach the url to an email, etc)

@davidfowl
Copy link
Author

@robbihun it will change the Request.Url property. Try it out for yourself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment