Tip programming

Monday, September 28, 2015

[iFrame] - Only allow on one domain

The best thing you can do is the following:
if (window.top.location.host != "hostname") {
    document.body.innerHTML = "Access Denied";
}
Add the above to your JavaScript and then use a JavaSript obfuscator
Posted by Unknown at 11:19 PM
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest
Newer Post Older Post Home

Search This Blog

Blog Archive

  • ►  2016 (7)
    • ►  February (7)
  • ▼  2015 (19)
    • ▼  September (19)
      • Installing memcached on OS X
      • BB Code to HTML
      • [iFrame] - Only allow on one domain
      • [CSS] text-overflow
      • Create dropdowns not suck
      • Create hexagons by CSS
      • How to enable autoplay videos on iOS or Android
      • Play multi video by canvas no interrupt
      • Compare performance Redis | Memcache | Memcached
      • How to copy or paste in the iOS Simulator
      • Detect when scroll to the bottom
      • Redis Tutorial
      • PHP using Predis
      • Networking With VirtualBox
      • Redis and PHP Connection
      • [JQuery] Image Cropping Plugin
      • [PHP] Fix orientation after upload image
      • Vertically centering a div inside another div
      • Maintain the aspect ratio of a div using only CSS
Picture Window theme. Powered by Blogger.