HTTP and HTTPS iframe

后端 未结 3 1569
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-11-30 03:26

I am creating a small widget and I want to allow others to use it. The iframe is loaded via HTTP - but I want to allow users to login via HTTPS. i.e. Send a req

3条回答
  •  半阙折子戏
    2020-11-30 04:28

    It is generally bad practice to embed an iframe with content served over HTTPS within a page served over plain HTTP (or mix content). The reason for this is that there's no good way for the user to check they're using the HTTPS site they intend (unless the user really wants to check the source of the page).

    An attacker could very well replace the content you serve like this: