Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(config): don't force access service url #423

Merged
merged 1 commit into from
Sep 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 1 addition & 10 deletions stacks/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -178,16 +178,7 @@ export function setupSentry (app, stack) {
* @param {ApiDomainProps | undefined} customDomain
*/
export function getServiceURL (stack, customDomain) {
// in production we use the top level subdomain
if (stack.stage === 'prod') {
return 'https://up.web3.storage'
// Derive from custom domain if there is one, which is used in staging, PR envs and dev envs
} else if (customDomain) {
return `https://${customDomain.domainName}`
// everywhere else we use something more estoteric - usually an AWS Lambda URL
} else {
return process.env.ACCESS_SERVICE_URL
}
return customDomain ? `https://${customDomain.domainName}` : process.env.ACCESS_SERVICE_URL
}

/**
Expand Down
Loading