I previously posted about 10 Interesting JavaScript Features. Here’s ten more JavaScript features that I’ve recently found interesting.
Links
- ColdFusion Design Patterns
- Minecraft Papercraft Minecraft Fan? You might like my newish Minecraft Papercraft site!
- Object Oriented ColdFusion
Pages
Categories
Tags
Abstraction Ant Apache Autocomplete CFCUnit CodexWiki ColdFusion Components Constants CSS DAO Dates Dependency Injection Design Patterns File Flash Forms Frameworks Gateways Groovy Guice Hosting HTML IIS Java JavaScript jQuery Mappings MSSQL MySQL Nested Set Trees OOP pagination Python Railo Security SES URLs Spring Strategy Timestamp Tomcat Tools Ubuntu Unit Testing ValidationArchives
- February 2012
- June 2011
- February 2011
- January 2011
- December 2010
- September 2010
- July 2010
- May 2010
- April 2010
- November 2009
- July 2009
- June 2009
- August 2008
- June 2008
- May 2008
- March 2008
- November 2007
- October 2007
- September 2007
- February 2007
- January 2007
- December 2006
- November 2006
- October 2006
- September 2006
- August 2006

Preventing Hotlinking with Nginx and NodeJS
If you are running a NodeJS site via Nginx then you may be using
proxy_passto route requests from Nginx to Node.If you’d like to also prevent hot linking then you might like to first have a read of Marcel Eichner’s post on preventing hot linking which this post is based on.
Then you can use a slightly modified version of that code which includes the
proxy_passdirective in both of thelocationsections.server { server_name yourdomain.com www.yourdomain.com; location ~* (\.jpg|\.png|\.gif)$ { valid_referers none blocked yourdomain.com www.yourdomain.com ~\.google\. ~\.yahoo\. ~\.bing\. ~\.facebook\. ~\.fbcdn\.; if ($invalid_referer) { return 403; } proxy_pass http://127.0.0.1:8123; } location / { proxy_pass http://127.0.0.1:8123; } }Some notes about this code:
In the
valid_referersline, ‘blocked’ allows Referers that have been blocked by a firewall, ‘none’ allows requests with no Referer.This is then followed by a list of domains and domain patterns that are also allowed. Google, Bing, etc are allowed for their image bots to access your site.