cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

How to embed the entire NEO4J browser as a tab (page) in a website

Sar
Node Link

We are hosting the NEO4J browser on a CentOS Linux 7 server on port 7474. On another port we are hosting a website via Django. Using iframe we are able to embed other applications running on other ports as tabs on this website, i.e. there is no need to give link to that application's port because it basically becomes a tab on the same website. But the same trick doesn't work for Neo4J. Do you know any way I can accomplish this? Maybe I need to do it a little bit differently? I searched for this and found some cases about embedding a certain graph, but I want to embed the entire browser; its login page and everything should just turn into a tab in my website. Is it possible? Thank you.

5 REPLIES 5

Hi @Sar ,

There are two aspects to hosting Neo4j Browser: making the UI itself available, and making the connection to Neo4j available.

Neo4j DBMS hosts Neo4j Browser UI assets on port 7474, but the connection to Neo4j uses port 7687. You'd need to make both available.

Could you share more detail about what isn't working? Is the Neo4j Browser UI loading? Is the connection to Neo4j failing? Something else?

Best,
ABK

After teaching myself more about iframe I came to notice that actually my question should have been "Is it possible to embed NEO4J via iframe" which was asked before here Neo4j browser in an iframe - how to set frame-ancestors security policy - Stack Overflow the problem is the neo4j server seems to enforce an X-Frame-Options: DENY
Thank you!

And using an html code like this also does not load NEO4J, so seems like there is no way to embed it (the same trick also works for another similar application running on another port of our server)


<div>
    <object type="text/html" data="http://website:7474/browser/" width="800px" height="600px" style="overflow:auto">
    </object>
 </div>

Hi @abk / @Sar,

Is there a way by which we can override below neo4j headers, so that we can iframe neo4j browser in a Web App? 

  • Content-Security-Policy: frame-ancestors 'none'
  • X-Frame-Options: DENY

Thanks!

Sar
Node Link

Thank you for your reply Andreas @abk
Sorry that it took some time for me to answer until I'd meet my colleague about this issue.
This is the iframe code he uses in our Django website code to embed the NEO4J browser as a tab:


<div class="bs-example col-sm-12" data-example-id="jbrowse">
   <div class="embed-responsive embed-responsive-16by9">
        <iframe class="embed-responsive-item" src="http://my.website:7474/browser/" allowfullscreen=""></iframe>
   </div>
</div>

but then the internet browser gives an error with loading the embedded browser, stating that it won't load a page hosted in another place, though it offers a link to open the NEO4J in a new window. The same code above embeds two other programs running on different ports on other tabs without a problem.

Do we need to add port 7687 somewhere in the code as well? Or do you have any other suggestion?

Many thanks!
Sar