Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn more

View all

Sign in to view all badges

SOLVED

HTML - Embed Iframe

sathya_prakasha
Level 5
Level 5

The below script is not working on embed component. 

 

<iframe src="https://www.w3schools.com" title="W3Schools Free Online Web Tutorials">
</iframe>

 

AEM 6.5.5.0
1 Accepted Solution
Umesh_Thakur
Correct answer by
Community Advisor
Community Advisor

Hi @sathya_prakasha ,

This issue you are facing, It seems due to XSS protection config, that is based on OWASP recommnedation.

So to enable it you need to enable the iframe in the config file. but that is not recommended.

 

OR

ELse you can use some jquery or vanila js to implement such thing using client libs.

 

Hope this will help

Umesh Thakur

View solution in original post

3 Replies
Umesh_Thakur
Correct answer by
Community Advisor
Community Advisor

Hi @sathya_prakasha ,

This issue you are facing, It seems due to XSS protection config, that is based on OWASP recommnedation.

So to enable it you need to enable the iframe in the config file. but that is not recommended.

 

OR

ELse you can use some jquery or vanila js to implement such thing using client libs.

 

Hope this will help

Umesh Thakur

View solution in original post

BrianKasingli
Community Advisor
Community Advisor

@sathya_prakasha, can you please share the error message from your console please?

KiranVedantam1992
Community Advisor
Community Advisor

Hi @sathya_prakasha,

 

You cant show many websites in an iFrame. Reason: An "X-Frame-Options: SAMEORIGIN" response header is set. which prevents the browser from displaying iFrames that are not hosted on the same domain [like parent page]. Its a security feature to prevent click-jacking.

 

C1.PNG

 

Hope this helps.

 

Thanks,

Kiran Vedantam.