Get original url without non-standard port (C#)

前端 未结 6 886
执念已碎
执念已碎 2021-02-12 21:43

First question!


Environment

MVC, C#, AppHarbor.

Problem

I am calling an openid provider,

6条回答
  •  花落未央
    2021-02-12 22:12

    My initial thoughts are get the referrer variable and check if that includes a port, if so use it otherwise don't.

    If that’s not an option because a proxy might remove the referrer header variable then you might need to use some client side script to get the location and pass it back to the server.

    I'm guessing that AppHarbor use port forwarding to the IIS server so even though publicly the site is on port 80 IIS has it hosted on another port so it can't know what port the client connected on.

提交回复
热议问题