[Python] .Net site X-frame-options denies Python site on same IIS server using...

Discussão em 'Python' iniciado por Stack, Fevereiro 27, 2025.

  1. Stack

    Stack Membro Participativo

    I have a Asp.Net 4.8 site in which I am trying to display a page from a django Python site on the same IIS server. Both sites are under the default website. the Python site displays news and is a one page app. Both have the same base URL except the Python site is using httpPlatformHandler, which I believe, changes the port on each call. As a result - the browser does not recognize that both are from the same origin and I receive the message chromewebdata/:1 Refused to display 'https://example.com/' in a frame because it set 'X-Frame-Options' to 'deny'.

    ASP.Net site is https://www.example.com/frontpage Python Sites is https://www.example.com/News

    Python site runs fine if you type in the Url. If I put that URL in an iframe in the frontpage site it never appears. How can I show the python site from the same origin if the port changes without allowing all sites?

    under response headers for the front page site I have [​IMG]

    Continue reading...

Compartilhe esta Página