1

we are not able to open URL in the iFrame when using chrome as a browser. We are using the latest version of chrome.

The Html we are using:-

<!DOCTYPE html>
   <html>
<body>
<h1>The iframe element</h1>
<iframe  src="http://localhost:8080/ui/overview" width="500px" height="500px">
</iframe>
</body>
</html>

But the iframe is returning Too many times redirect issue.too Many redirect Screenshot

We have also used this in the spring-security.xml file:-

<headers>
        <frame-options disabled="true" />
    </headers>

We have also tried to configure in our Web application init() method:-

we set the wicket RenderStrategy to :- RequestCycleSettings.RenderStrategy.REDIRECT_TO_BUFFER

When we inspect elements and see the network tab in chrome. This is the output. It shows 302 as Status :- Redirect failed picture

It is not working in google chrome only. How can we solve this issue?

Please suggest some way to do it.

  • What happens if you try to load http://localhost:8080/ui/overview in a tab, i.e. not in IFrame ? Please take screenshots of the headers of two consecutive requests in Dev Tools. Comparing the headers between Google Chrome and Firefox should explain what is the difference between non-working and working setup. – martin-g Mar 17 '21 at 10:04
  • Hello @martin-g, I'm teammate of kislay answering on his behalf - If we open localhost:8080/ui/overview in a tab, then website get open no issues at all. You can yourself try it out - https://data.smart360.me/smart360/ui/overview . Also, strange thing is it works in Firefox and worked in Google Chrome Jan 2020 release. From March 2020 release of Google Chrome, it stopped working. Will share the headers in question description, soon. – Sunil Kumar Mar 17 '21 at 14:09
  • Maybe Chrome isn't sending cookies in your iframe? You could try disabling cookies in your web container and see whether it works with a session-identifier (JSESSIONID) in the url instead. – svenmeier Mar 17 '21 at 19:30
  • See https://stackoverflow.com/a/45095345/497381 – martin-g Mar 18 '21 at 07:30

0 Answers0