https://github.com/eddex/koios-proxy
HTTP proxy for the Koios API 🌐
https://github.com/eddex/koios-proxy
cardano csharp dotnet dotnet-core http-proxy koios web3 yarp
Last synced: 3 months ago
JSON representation
HTTP proxy for the Koios API 🌐
- Host: GitHub
- URL: https://github.com/eddex/koios-proxy
- Owner: eddex
- License: mit
- Created: 2022-12-03T15:22:16.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2023-12-01T08:34:08.000Z (over 2 years ago)
- Last Synced: 2025-10-14T10:34:25.890Z (9 months ago)
- Topics: cardano, csharp, dotnet, dotnet-core, http-proxy, koios, web3, yarp
- Language: C#
- Homepage:
- Size: 23.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Koios Proxy
Simple proxy to make requests to the public Cardano [Koios API](https://api.koios.rest)
from your web3 Dapp frontend.
## Run from pre-built docker image
`docker run -p 5001:80 eddex/koios-proxy`
Any request to `http://localhost:5001/*` will be forwarded to `https://api.koios.rest/*`.
The image is hosted on [DockerHub](https://hub.docker.com/repository/docker/eddex/koios-proxy/general).
**Environment variables**
| Name | Default | Valid values | Description |
| ---------------------- | ------------ | ------------------------------------------------------ | --------------------------------------------------------- |
| ASPNETCORE_ENVIRONMENT | `Production` | `Development`, `Production` | Defines which appsettings.json configuration file is used |
| ALLOWED_ORIGINS | `*` | Comma separated list of allowed domains (`*`=wildcard) | CORS allowed origins |
```bash
# Example: Use `appsettings.Development.json` and allow requests from `a.io` as well as all subdomains of `b.ch`.
docker run --rm -p 5001:80 \
-e "ASPNETCORE_ENVIRONMENT=Development" \
-e "ALLOWED_ORIGINS=a.io,*.b.ch" \
eddex/koios-proxy:latest
```
## Run from source code
`dotnet run --project ./KoiosProxy/`
## Build docker image from source code
1. Build image: `docker build -t koios-proxy -f ./KoiosProxy/Dockerfile .`
2. Run container: `docker run --rm -p 5001:80 koios-proxy:latest`
## Attributions
- powered by [YARP](https://github.com/microsoft/reverse-proxy)