bank: API for auto-created personal accounts (balance zero)
Add GET /intro/auto-account.json on the bank helper (demo-withdraw-api): public registration with generated username/password, balance starts GOA:0, credentials returned once for the client to display. Nginx proxies the new path; install-demo-withdraw-api.sh installs the location. This is separate from the shared explorer demo withdraw.
This commit is contained in:
parent
65629ea57c
commit
f341116371
4 changed files with 267 additions and 14 deletions
|
|
@ -39,6 +39,21 @@ if "demo-withdraw.json" not in t:
|
|||
print("nginx location added")
|
||||
else:
|
||||
print("nginx already has demo-withdraw")
|
||||
if "auto-account.json" not in t:
|
||||
t=p.read_text()
|
||||
block2=""" location = /intro/auto-account.json {
|
||||
proxy_pass http://127.0.0.1:19096/auto-account.json;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Host \$host;
|
||||
add_header Cache-Control "no-store" always;
|
||||
add_header Access-Control-Allow-Origin * always;
|
||||
}
|
||||
"""
|
||||
t=t.replace(" location /intro/ {", block2+" location /intro/ {", 1)
|
||||
p.write_text(t)
|
||||
print("nginx auto-account location added")
|
||||
else:
|
||||
print("nginx already has auto-account")
|
||||
PY
|
||||
nginx -t && nginx -s reload || true
|
||||
else
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue