Frameprevention is a great module, but the flipside is sometimes you want to enabled framing in certain cases, e.g. if you publish widgets based on your site.

Right now the only way to control frameprevention is by your site's own URL. It would be great to have flexibility to pick and choose which sites may or may not frame yours. For examples you may publish a widget as a Facebook app iFrame and would break frames everywhere else.

I suppose this module could include an extra JS filter of URLs that are allowed to frame?

Comments

couloir007’s picture

Issue tags: +frameprevention, +white list
StatusFileSize
new2.23 KB

I've created a white list patch that may be of use.

couloir007’s picture

For anyone interested, I also created a sub module that does this too, although it's not as elegant as the patch given the way the js is added to the head.

deekayen’s picture

Status: Active » Needs work

The patch doesn't meet Drupal coding standards.

Change tabs to two spaces, add a space between if and the opening parenthesis, only the first letter of the form element title should be capitalized, once you find a match break out of the foreach loop so you don't unnecessarily loop domains after a match, and variable_get() should have a default value.

couloir007’s picture

StatusFileSize
new1.72 KB

I updated the patch to meet Drupal coding standards. I'm not sure what to do about the variable_get() since I did not modify it in any way from what was already in the module.