Skip to content

Commit

Permalink
fix(prod): gateway host
Browse files Browse the repository at this point in the history
  • Loading branch information
fforbeck committed Jan 10, 2025
1 parent 932ffaa commit 20f31b8
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deploy-storacha.yml
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ jobs:
echo "NEXT_PUBLIC_W3UP_SERVICE_URL=https://up.storacha.network" >> .env
echo "NEXT_PUBLIC_W3UP_RECEIPTS_URL=https://up.storacha.network/receipt/" >> .env
echo "NEXT_PUBLIC_W3UP_PROVIDER=did:web:web3.storage" >> .env
echo "NEXT_PUBLIC_W3UP_GATEWAY_HOST=https://freeway.dag.haus" >> .env
echo "NEXT_PUBLIC_W3UP_GATEWAY_HOST=https://w3s.link" >> .env
echo "NEXT_PUBLIC_W3UP_GATEWAY_ID=did:web:w3s.link" >> .env
echo "NEXT_PUBLIC_IPFS_GATEWAY_URL=https://%ROOT_CID%.ipfs.w3s.link" >> .env
echo "NEXT_PUBLIC_STRIPE_PRICING_TABLE_ID=prctbl_1OCJ1qF6A5ufQX5vM5DWg4rA" >> .env
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ jobs:
echo "NEXT_PUBLIC_W3UP_SERVICE_URL=https://up.web3.storage" >> .env
echo "NEXT_PUBLIC_W3UP_RECEIPTS_URL=https://up.web3.storage/receipt/" >> .env
echo "NEXT_PUBLIC_W3UP_PROVIDER=did:web:web3.storage" >> .env
echo "NEXT_PUBLIC_W3UP_GATEWAY_HOST=https://freeway.dag.haus" >> .env
echo "NEXT_PUBLIC_W3UP_GATEWAY_HOST=https://w3s.link" >> .env
echo "NEXT_PUBLIC_W3UP_GATEWAY_ID=did:web:w3s.link" >> .env
echo "NEXT_PUBLIC_IPFS_GATEWAY_URL=https://%ROOT_CID%.ipfs.w3s.link" >> .env
echo "NEXT_PUBLIC_STRIPE_PRICING_TABLE_ID=prctbl_1OCJ1qF6A5ufQX5vM5DWg4rA" >> .env
Expand Down
7 changes: 1 addition & 6 deletions src/components/services.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,4 @@ export const serviceConnection = connect<Service>({
}),
})

/**
* Using freeway.dag.haus/freeway-staging.dag.haus as the gateway host directly without going through w3s.link
* to avoid the need to avoid access fetch error in production due to the w3s.link CORS policy:
* - Redirect is not allowed for a preflight request.
*/
export const gatewayHost = process.env.NEXT_PUBLIC_W3UP_GATEWAY_HOST ?? 'https://freeway.dag.haus'
export const gatewayHost = process.env.NEXT_PUBLIC_W3UP_GATEWAY_HOST ?? 'https://w3s.link'

0 comments on commit 20f31b8

Please sign in to comment.