Saiku-config spring-security allow IFrame to load Saiku home

Source: Internet
Author: User

Recently, a requirement was presented: presenting Saiku in an IFRAME home

Oh, it's not easy.

Direct <iframe src= "Http://localhost:8080/saiku"/> set in not to be finished? I'm really a genius.

Result: Whining ... Error ...

Error hint: refused to display ' http://localhost:8080/saiku/' in a frame because it set ' x-frame-options ' to ' DENY '.

There is a property in the header "X-frame-options" is set to "DENY" by default

Well, find out where the problem, looking for a half-day to find Ah ...

Today, PM says it's because:

Spring-security default is set this "X-frame-options" property to deny, in the configuration file changes under configuration is good

< security:http >    < security:headers >        <  policy= "Sameorigin"/>    </security:headers  ></security:http>

Policy Value Description

Deny means that the page is not allowed to be displayed in a frame, even if it is nested within the same domain name's page.
Sameorigin indicates that the page can be displayed in a frame on the same domain Name page.
The Allow-from URI indicates that the page can be displayed in a frame of the specified source. In other words, if set to DENY, not only in other people's site frame embedding will not load, in the same domain Name page will also be unable to load. On the other hand, if set to Sameorigin, then the page can be nested in the frame with the Domain Name page.

In this way, sure enough ...

By the the-by, spring security actually buried the pit by default ... It's killing me.

Saiku-config spring-security allow IFrame to load Saiku home

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.