@mojodna/tp
A teeing reverse proxy
Last updated 3 years ago by mojodna .
BSD · Original npm · Tarball · package.json
$ cnpm install @mojodna/tp 
SYNC missed versions from official npm registry.

'tp

Putting the tee in HTTP.

This acts as a reverse proxy and tees responses into S3 for semi-permanent storage. It's intended to be used with Varnish as a secondary backend (to serve up and populate S3 misses).

Purging the S3 Bucket

This will empty the configured S3 bucket of everything:

foreman run node bin/purge.js

It's intended to be used when cached content is being refreshed, before Varnish is purged.

Configuration

tp.json:

{
  "/background/": {
    "origin": "http://background.example.com"
  },
  "/features/": {
    "origin": "http://features.example.com"
  },
  "/labels/": {
    "origin": "http://labels.example.com"
  },
  "/": {
    "origin": "http://default.example.com",
    "pathPrefix": "default"
  }
}

Environment Variables

  • S3_BUCKET - Target S3 bucket
  • S3_URL - S3 URL, defaults to http://s3.amazonaws.com
  • AWS_ACCESS_KEY_ID - AWS Access Key ID
  • AWS_SECRET_ACCESS_KEY - AWS Secret Access Key
  • CACHE_EVERYTHING - treat everything as cacheable (optional), regardless of upstream Cache-Control headers
  • NODE_ENV - Express environment (should be production in production)

Current Tags

  • 0.1.0                                ...           latest (3 years ago)

1 Versions

  • 0.1.0                                ...           3 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (7)
Dev Dependencies (1)
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |