Skip to content

Commit a08cfa8

Browse files
committed
[DDW-1203] Update the PR for Lace, too
1 parent eb72279 commit a08cfa8

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

nix/oci-images.nix

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff 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 = ''

0 commit comments

Comments
 (0)