front

command module
v0.0.0-...-6e56365 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 14, 2015 License: MIT Imports: 12 Imported by: 0

README

front

Proxies and manipulates images, allowing user embedded content to be served from a single secure host at various sizes.

Deploy Circle CI


Usage

As proxy

Pass the remote image url to your front deployment as a url param. For example, to proxy an insecure gopher http://golang.org/doc/gopher/frontpage.png:

https://go-front.herokuapp.com/?url=http://golang.org/doc/gopher/frontpage.png

HTTPS Gopher

To resize images

Add width and height params to the standard proxy url. For example, for a smaller gopher:

https://go-front.herokuapp.com/?url=http://golang.org/doc/gopher/frontpage.png&width=125&height=175

Small Gopher


Deployment

The simplest method is to deploy on heroku:

Deploy

You'll probably want to add a CDN (e.g. CloudFront) to your front deployment for caching


Configuration

Config is via environment variables:

variable description optional
PORT The port to listen on no, though automatically set on heroku
ALLOWED_CONTENT_TYPE_REGEX Regex the upstream Content-Type must match in order to be proxied yes, defaults to ^image/

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Godeps
_workspace/src/github.com/disintegration/imaging
Package imaging provides basic image manipulation functions (resize, rotate, flip, crop, etc.).
Package imaging provides basic image manipulation functions (resize, rotate, flip, crop, etc.).
_workspace/src/golang.org/x/image/bmp
Package bmp implements a BMP image decoder and encoder.
Package bmp implements a BMP image decoder and encoder.
_workspace/src/golang.org/x/image/tiff
Package tiff implements a TIFF image decoder and encoder.
Package tiff implements a TIFF image decoder and encoder.
_workspace/src/golang.org/x/image/tiff/lzw
Package lzw implements the Lempel-Ziv-Welch compressed data format, described in T. A. Welch, “A Technique for High-Performance Data Compression”, Computer, 17(6) (June 1984), pp 8-19.
Package lzw implements the Lempel-Ziv-Welch compressed data format, described in T. A. Welch, “A Technique for High-Performance Data Compression”, Computer, 17(6) (June 1984), pp 8-19.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL