https://github.com/dylrich/image-proxy
A simple image proxy server
https://github.com/dylrich/image-proxy
go grayscale http image proxy
Last synced: 5 months ago
JSON representation
A simple image proxy server
- Host: GitHub
- URL: https://github.com/dylrich/image-proxy
- Owner: dylrich
- Created: 2020-01-28T05:19:39.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-01-28T05:20:40.000Z (about 6 years ago)
- Last Synced: 2025-09-03T01:43:05.375Z (7 months ago)
- Topics: go, grayscale, http, image, proxy
- Language: Go
- Size: 1.95 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Simple Grayscale Proxy
A simple proxy server which proxies calls to an origin host and converts valid png/jpeg responses to grayscale. Requests timeout after five seconds. This server has been tested with https://maps.wikimedia.org/, https://secure.gravatar.com/ and https://i.redd.it/ explicitly. No guarantees that every server works correctly, especially if they have bizarre HTTP semantics around their response codes. Does not yet support query parameter passthrough, but this would be a simple feature to add.
## Development
### Configuration
This project relies on the following environment variables:
* `ORIGIN_SERVER`: the host to use as the origin server for requesting images
* `APP_HOST`: the host for the proxy server to listen on
* `APP_PORT`: the port for the proxy server to listen on
Try the following example configuration:
```bash
export ORIGIN_SERVER=https://maps.wikimedia.org/
export APP_HOST=localhost
export APP_PORT=3000
```
### Build and Run
```bash
git clone git@github.com:dylrich/image-proxy.git && cd image-proxy
go build && ./image-proxy
```