Permalink
Commits on Oct 31, 2018
  1. Reject invalid requests instead of crashing (#142)

    Rob--W committed Oct 31, 2018
Commits on Dec 1, 2017
  1. Version 0.4.1

    Rob--W committed Dec 1, 2017
    - Add ability to rate-limit/block requests by origin (#45).
    - Avoid crashing on invalid HTTP status codes (#95).
    - Support and test coverage for latest Node.js versions (up to 9).
    - Support `Access-Control-Max-Age` via `corsMaxAge` option.
    - Listen on `0.0.0.0:8080` by default instead of `127.0.0.1:8080`.
      (use `HOST` and `PORT` environment variables to override this).
    - Update gTLD list.
Commits on Nov 11, 2017
  1. Fix failing tests for 0.10.x, 4.x and 5.x

    Rob--W committed Nov 11, 2017
    Travis build failed on "Uncaught TypeError: Object.keys called on non-object".
    That's a real error (res._headers was initially null until a header is set).
  2. Add Node 9.x to Travis

    Rob--W committed Nov 11, 2017
    Locally tested that the tests pass with Node 9.0.0 and 9.1.0
    Also modified a test expectation for Node 9.0.0+
  3. Remove engines.npm (#92)

    Rob--W committed Nov 10, 2017
    NPM 5.5.1 is not compatible with Node.js 9.1.0.
    Let's use the npm that ships with node.
Commits on Nov 10, 2017
  1. Update gTLD list

    Rob--W committed Nov 10, 2017
Commits on Nov 8, 2017
Commits on Jul 16, 2017
  1. Merge pull request #77 from gnjack/maxAge

    Rob--W committed Jul 16, 2017
    Allow caching of CORS headers by setting Access-Control-Max-Age header
Commits on Jul 13, 2017
  1. Monkey-patch nock, add Node v8 to test matrix

    Rob--W committed Jul 13, 2017
  2. Update test expectation for "100 GET requests 50k"

    Rob--W committed Jul 13, 2017
    Locally Node v7 and v8 also have higher memory expectations,
    so just use the same maximum memory value for v0.x and non-v0.x.
  3. Explicit Node versions in Travis build matrix

    Rob--W committed Jul 13, 2017
    This communicates more clearly for which versions of Node.js
    the tests have run.
    
    8 is not listed because tests are failing due to the nock HTTP mocking
    library being incompatible with Node v8.
  4. Upgrade supertest + nock to recent version

    Rob--W committed Jul 13, 2017
    The most recent version that was explicitly marked as compatible with
    Node.js 0.10.x
  5. Change response handling hook

    Rob--W committed Jul 13, 2017
    When proxyReq is aborted (by us - in response to a redirect response),
    it can ultimately trigger an "error" event of type ECONNRESET.
    This error was unconditionally propagated to the error handler:
    https://github.com/nodejitsu/node-http-proxy/blob/v1.11.1/lib/http-proxy/passes/web-incoming.js#L134-L140
    
    Our proxy error handler responds by writing a response + error code,
    which prevents the response from being overwritten.
    
    I found this after upgrading the nock library to 5.2.1+, which contains
    nock/nock@510e31c
    The redirect tests that were previously passing in Node 0.10.x were
    failing, with errors like "Can't set headers after they are sent.".
    
    The new implementation makes sure that the proxied response is not
    forwarded to the original response.
  6. Update mocha to ^3.4.2

    Rob--W committed Jul 13, 2017
    to unlock goodies such as --inspect / --inspect-brk
Commits on May 31, 2016
  1. Correctly parse environment list in server.js

    Rob--W committed May 31, 2016
    Previously an unset value resulted in [""] instead of [].
Commits on May 30, 2016
  1. Add rate-limiting functionality #45

    Rob--W committed May 30, 2016
    - Add checkRateLimit option to the API.
    - Extend the default server.js with environment variables
      CORSANYWHERE_WHITELIST (re-using originWhitelist) and
      CORSANYWHERE_RATELIMIT (using the new checkRateLimit option)
      to make it easy to enforce usage limits.
    - Document that Heroku doesn't want open proxies.
Commits on May 14, 2016
  1. Add examples for modifying requests or responses

    Rob--W committed May 14, 2016
Commits on Mar 19, 2016
  1. Version 0.4.0

    Rob--W committed Mar 19, 2016
    - CI & 100% test coverage
    - Do not crash when a malformed HTTP response is received.
    - Remove getHandler (its documented form was broken anyway).
    - Allow custom help file to be set.
    - Add option to redirect same-origin requests instead of proxying them.
  2. Add redirectSameOrigin

    Rob--W committed Mar 19, 2016
    Some clients try to use CORS Anywhere, even for same-origin requests...
    Add a new setting "redirectSameOrigin" to not waste server resources on
    proxying such requests.
    
    Fixes #42
Commits on Feb 26, 2016
  1. It's 2016

    Rob--W committed Feb 26, 2016
    (and remove unnecessary section about Dependencies,
    because it mentioned 3x in the previous section and package.json)
  2. 100% test coverage :)

    Rob--W committed Feb 26, 2016
  3. Merge pull request #40 from Rise-Vision/feature/custom-help-text

    Rob--W committed Feb 26, 2016
    Feature/custom help text
  4. Fix tests: Explicitly start and close servers

    Rob--W committed Feb 26, 2016
    Otherwise these tests fail on Node 0.10.x
  5. Remove getHandler

    Rob--W committed Feb 26, 2016
    It is not supported, and its current form was not documented.
    If you need to proxy a request without listening on a port, just
    dispatch a 'request' event on the return value of createServer().
  6. requireHeader: Improve coverage and fix bug

    Rob--W committed Feb 26, 2016
    When the single-string version of requireHeader was used, it was not
    properly transformed to a lowercase string. Now it is.
  7. Remove requiresPort dependency

    Rob--W committed Feb 26, 2016
    location.host is directly parsed from the full URL, so the
    "concatenate host and port" branch was never taken.
  8. Add Travis and test coverage

    Rob--W committed Feb 26, 2016
    Notes:
    - npm run test also runs the memory tests, which might be flaky on
      some systems.
    - npm run test-coverage only runs the unit tests (it can't run the
      memory test anyway because the memory tests create a Node child
      process, and istanbul cannot cover that).
Commits on Feb 18, 2016
  1. Version 0.3.0

    Rob--W committed Feb 18, 2016
    - Support proxying through proxy (`getProxyForUrl` option, defaulting to
      proxy configuration from the environment variables, see
      https://github.com/Rob--W/proxy-from-env) (#37).
    - Update gTLD list.