-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d9cfc8a
commit b528ae1
Showing
1 changed file
with
1 addition
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,7 @@ import assert from 'node:assert' | |
import Sentry from '@sentry/node' | ||
|
||
const handler = async (req, res, apiKey, fetch) => { | ||
res.setHeader('Access-Control-Allow-Origin', 'http://localhost:3000') | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
juliangruber
Author
Member
|
||
const address = req.url.split('/')[1].trim() | ||
const fetchRes = await fetch( | ||
`https://public.chainalysis.com/api/v1/address/${address}`, | ||
|
This isn't going to work after we deploy the code to Fly.io, right? We need CORS to allow the Desktop to call the service at the domain name where it's deployed.
I am proposing to introduce a new ENV var to control this domain, initialise it to
localhost:3000
by default, and then modify the Dockerfile to set this env var to the hostname where we are deploying to.