Skip to content
This repository has been archived by the owner on Aug 23, 2019. It is now read-only.

Commit

Permalink
Fixed string length bug in workit-cors.
Browse files Browse the repository at this point in the history
  • Loading branch information
shannonmoeller committed Dec 31, 2012
1 parent e13673d commit e8fc413
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions README.md
Expand Up @@ -156,6 +156,9 @@ gradients.
Change Log
----------

### 1.0.1
- Fixed string length bug in workit-cors.

### 1.0.0
- Changed middleware prefixes from `connect-` to `workit-` so as not to be
confused with middleware of the same name by different authors.
Expand Down
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "workit",
"version": "1.0.0",
"version": "1.0.1",
"description": "The stupid development server. Serves CoffeeScript, Jade, and Stylus like a champ. Reloads browser on source-file change. CORS enabled.",
"keywords": ["assets", "compile", "cors", "live", "preprocess", "proxy", "reload", "serve", "static", "watch"],
"author": "Shannon Moeller <me@shannonmoeller.com> (http://shannonmoeller.com)",
Expand Down
2 changes: 1 addition & 1 deletion src/cli.coffee
Expand Up @@ -5,7 +5,7 @@ commander = require 'commander'
path = require 'path'

# Arguments
commander.version('1.0.0')
commander.version('1.0.1')
.usage('[options] [dir]')
.option('-a, --address <string>', 'set hostname [localhost]')
.option('-f, --format <string>', 'connect logger format [dev]', 'dev')
Expand Down
2 changes: 1 addition & 1 deletion src/workit-cors.coffee
Expand Up @@ -12,7 +12,7 @@ module.exports = (req, res, next) ->
res.setHeader 'Access-Control-Allow-Headers', 'X-Requested-With'

# Guard proxy requests
return next() unless req.url.slice(0, 14) is '/workit-cors/'
return next() unless req.url.slice(0, 13) is '/workit-cors/'

# Parse url
opts = url.parse req.url.slice(14)
Expand Down

0 comments on commit e8fc413

Please sign in to comment.