Spring boot application : local URL doesn’t load in an IFrame

Problem : Application URLs (local urls) not loading in iframe inside an application UI.

Reason : Spring sets the X-Frame-Options to Deny by default.

Fix : Allow Same-origin-URLs in frames.

In Security configuration, add –

http
     .headers().frameOptions().sameOrigin()
     .and
     .//other configs

Leave a Reply

Your email address will not be published. Required fields are marked *

*

* Copy This Password *

* Type Or Paste Password Here *

46,675 Spam Comments Blocked so far by Spam Free Wordpress

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>