Sign inSign up

thisiserico/devcdn

By thisiserico

•Updated about 9 years ago

A CDN application to use in development environments.

Image
0

261

thisiserico/devcdn repository overview

⁠dev CDN

A simulated CDN for development purposes

⁠Usage

Using the source code: ORIGIN_ADDRESS=http://localhost:8201 go run main.go

Using the docker image: docker run -e ORIGIN_ADDRESS=http://localhost:8201 -p 8123:8123 thisiserico/devcdn:latest

Using docker-compose:

devcdn:
    image: thisiserico/devcdn:latest
    environment:
        ORIGIN_ADDRESS: http://origin:8201
    ports:
        - 8123:8123
    depends_on:
        - origin

⁠Configuration options through env vars

APP_PORT The port where the app should be running (8123 by default).

ORIGIN_ADDRESS The address (schema and port included) where the origin service can be found.

RESOURCE_TTL The TTL a resource should be kept in seconds. Defaults to 3600.

CDN_CUSTOM_HEADERS Custom headers that devcdn will add to the outcoming response. By default, only x-via:devcdn and x-devcdn:hit|miss will be added. Specify them in the form of header-1:value|header-2:value1,value2.

CDN_CACHING_HEADERS Request headers to use to have a more granular caching strategy. Specify them in the form of header-1,header-2.

Tag summary

Content type

Image

Digest

Size

2.2 MB

Last updated

about 9 years ago

docker pull thisiserico/devcdn