Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

How could i set CORS for Ambari Views so that i can use iframe to embeded them in my other webapp?

Highlighted

How could i set CORS for Ambari Views so that i can use iframe to embeded them in my other webapp?

Explorer

I am trying to integrate the Files/Hive view into my webapp with iframe, but i got the error that shows:

Load denied by X-Frame-Options: http://xxx:8080/views/FILES/1.0.0/AUTO_FILES_INSTANCE/#/files does not permit cross-origin framing.

How could i set for the options so that i can use them in an iframe cross domain?

1 REPLY 1
Highlighted

Re: How could i set CORS for Ambari Views so that i can use iframe to embeded them in my other webapp?

Explorer

I found it in the /etc/ambari-server/conf/ambari.properties

views.http.x-frame-options=SAMEORIGIN

and i am able to use ALLOW-FROM URL to makes my webapp can use iframe to show this.

but if i set the URL then my ambari-ui can not show this iframe.

is there any way to make ambari and my webapp can both use iframe show this view?

Don't have an account?
Coming from Hortonworks? Activate your account here