akvo / akvo-sites

Repository which will hold the Open Source code for the WP Theme, and also to track bugs and issues in the series of Consortia sites we maintain.
1 stars 6 forks source link

CartoDB maps in iFrame - DENY #216

Closed Lynngre closed 9 years ago

Lynngre commented 9 years ago

(This is more of a note than an issue as it is fixed.)

Looks like CartoDB have made changes to their page headers.

The Advanced iFrame plugin no longer seems to work in the same way as before as the header reads:

The header ist set to DENY. This means the page cannot be included into an iframe. Show the full header Header for: http://akvo.cartodb.com/viz/1b5089ba-8062-11e4-bdb7-0e018d66dc29/public_map HTTP/1.1 200 OK Server: openresty Date: Tue, 20 Oct 2015 14:09:11 GMT Content-Type: text/html; charset=utf-8 Content-Length: 37423 Connection: keep-alive Vary: Accept-Encoding Status: 200 OK X-Frame-Options: DENY Surrogate-Key: rp rv:lHjn1m Cache-Control: no-cache,max-age=86400,must-revalidate, public X-CartoDB-Rev: 54cfd26f4ae90fd56bbfdd8d26a00055ac74e284 X-UA-Compatible: IE=Edge,chrome=1 X-Request-Id: 583d3d86ab69061651aa5b9ba66f00aa X-Runtime: 0.269911 X-Varnish: 1217457477 1217219274 Age: 2509 X-Cache: HIT

The solution is to just pop the iFrame code provided by CartoDB itself as the embed option directly into the Wordpress page, for example:

iframe width="100%" height="520" frameborder="0" src="https://akvo.cartodb.com/viz/1b5089ba-8062-11e4-bdb7-0e018d66dc29/embed_map" allowfullscreen webkitallowfullscreen mozallowfullscreen oallowfullscreen msallowfullscreen></iframe