Skip to content

Instantly share code, notes, and snippets.

@ryedin
Created March 8, 2011 20:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ryedin/860974 to your computer and use it in GitHub Desktop.
Save ryedin/860974 to your computer and use it in GitHub Desktop.
allow devs to explicitly serve common static resources from shared location outside of running app
if (!options.allowUnsafe && ~path.indexOf('..')) return fn
? fn(new Error('Forbidden'))
: forbidden(res);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment