Skip to content

Commit 58c6abc

Browse files
authored
Make access control allow origin backwards compatible (#379)
1 parent 7c6adea commit 58c6abc

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/db/configuration/getConfiguration.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,12 @@ export const getConfiguration = async (): Promise<Config> => {
197197
authDomain: "thirdweb.com",
198198
authWalletEncryptedJson: await createAuthWalletEncryptedJson(),
199199
});
200+
} else if (!config.accessControlAllowOrigin) {
201+
config = await updateConfiguration({
202+
accessControlAllowOrigin: !!process.env.ACCESS_CONTROL_ALLOW_ORIGIN
203+
? process.env.ACCESS_CONTROL_ALLOW_ORIGIN
204+
: mandatoryAllowedCorsUrls.join(","),
205+
});
200206
}
201207

202208
return withWalletConfig(config);

0 commit comments

Comments
 (0)