File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -56,6 +56,14 @@ if targetSystem == "x86_64-linux" then {
5656 set $coingecko https://api.coingecko.com;
5757 proxy_pass $coingecko;
5858 }
59+ location = /api/v3/simple/price {
60+ if ( $args !~ ^ids=(cardano|bitcoin)&vs_currencies=[a-z0-9,]+(&include_last_updated_at=(true|false))?(&include_24hr_change=(true|false))?$ ) { return 400; }
61+ ${ proxyConf }
62+ proxy_cache_valid 200 400 10m;
63+ proxy_cache_valid any 1m;
64+ set $coingecko https://api.coingecko.com;
65+ proxy_pass $coingecko;
66+ }
5967 }
6068 }
6169 '' ;
@@ -113,6 +121,8 @@ if targetSystem == "x86_64-linux" then {
113121 '/api/v3/simple/supported_vs_currencies' \
114122 '/api/v3/coins/markets?ids=cardano&vs_currency=usd' \
115123 '/api/v3/coins/markets?ids=cardano&vs_currency=jpy' \
124+ '/api/v3/simple/price?ids=cardano&vs_currencies=usd&include_last_updated_at=true' \
125+ '/api/v3/simple/price?ids=cardano&vs_currencies=usd&include_24hr_change=true' \
116126 ; do
117127 sleep 2
118128 echo "Will pre-populate cache with: ‘$endpoint’…"
@@ -124,7 +134,7 @@ if targetSystem == "x86_64-linux" then {
124134 exec ${ pkgs . lib . escapeShellArgs ( nginxCmd { listenPort = 80 ; } ) }
125135 '' ;
126136 in pkgs . dockerTools . buildImage rec {
127- name = "daedalus- coingecko-proxy" ;
137+ name = "coingecko-proxy" ;
128138 tag = inputs . self . rev or "dirty" ;
129139 copyToRoot = with pkgs . dockerTools ; [ caCertificates fakeNss ] ; # XXX: needed for nginx
130140 runAsRoot = ''
You can’t perform that action at this time.
0 commit comments