Use explicit deployment token in setup prompt
This commit is contained in:
@@ -65,8 +65,8 @@ These can be overridden with CLI flags or environment variables:
|
|||||||
- `--port` or `PORT`
|
- `--port` or `PORT`
|
||||||
- `--proxy-api-key` or `PROXY_API_KEY`
|
- `--proxy-api-key` or `PROXY_API_KEY`
|
||||||
|
|
||||||
For mass deployments, set `PROXY_API_KEY` to the token generated by the deployment system. The
|
For mass deployments, pass the generated token with `--proxy-api-key`. The app will use that
|
||||||
app will use that token as the required `Authorization: Bearer ...` value.
|
token as the required `Authorization: Bearer ...` value.
|
||||||
|
|
||||||
## Verify
|
## Verify
|
||||||
|
|
||||||
|
|||||||
@@ -2,10 +2,9 @@ Clone and run https://git.komnenos.me/springfw/random-proxy in ./random-proxy.
|
|||||||
|
|
||||||
Goal: get the app running once, with Replit AI Integrations wired, on port 3000.
|
Goal: get the app running once, with Replit AI Integrations wired, on port 3000.
|
||||||
|
|
||||||
The deployment system may provide a generated bearer token for this instance. Use that exact
|
Bearer token for this deployment: DEPLOYMENT_GENERATED_PROXY_TOKEN
|
||||||
token as the `PROXY_API_KEY` environment variable/secret. Do not invent, rotate, print, or
|
|
||||||
replace it. If no generated token is provided, leave `PROXY_API_KEY` unset and use the app
|
Use that exact token as the proxy bearer token. Do not invent, rotate, print, store, or replace it.
|
||||||
default only for verification.
|
|
||||||
|
|
||||||
Do not:
|
Do not:
|
||||||
- add it to a parent workspace
|
- add it to a parent workspace
|
||||||
@@ -25,16 +24,15 @@ Steps:
|
|||||||
- OpenAI
|
- OpenAI
|
||||||
- Anthropic
|
- Anthropic
|
||||||
|
|
||||||
3. Set `PROXY_API_KEY` to the deployment-provided/generated token if one was provided.
|
3. Start the app with this command:
|
||||||
|
|
||||||
4. Open ./random-proxy and use the configured Replit Run button.
|
cd random-proxy && pnpm dev -- --proxy-api-key DEPLOYMENT_GENERATED_PROXY_TOKEN
|
||||||
|
|
||||||
5. Wait briefly, then verify. Use the generated token in the Authorization header when
|
4. Wait briefly, then verify:
|
||||||
`PROXY_API_KEY` was set; otherwise use `dev-proxy-key`:
|
|
||||||
|
|
||||||
curl -s http://localhost:3000/api/healthz
|
curl -s http://localhost:3000/api/healthz
|
||||||
curl -s http://localhost:3000/dashboard | head
|
curl -s http://localhost:3000/dashboard | head
|
||||||
curl -s -H "Authorization: Bearer ${PROXY_API_KEY:-dev-proxy-key}" http://localhost:3000/v1/models
|
curl -s -H "Authorization: Bearer DEPLOYMENT_GENERATED_PROXY_TOKEN" http://localhost:3000/v1/models
|
||||||
|
|
||||||
Report only:
|
Report only:
|
||||||
- local URL
|
- local URL
|
||||||
|
|||||||
Reference in New Issue
Block a user