0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2024-12-16 20:26:19 -05:00

refactor: improve allow CORS tooltip wording (#1427)

This commit is contained in:
Charles Zhao 2022-07-05 21:09:57 +08:00 committed by GitHub
parent 5512f9f4ea
commit 45395ff74e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 4 deletions

View file

@ -25,10 +25,9 @@ export const validateCustomClientMetadata = (key: string, value: unknown) => {
export const isOriginAllowed = (
origin: string,
customClientMetadata: CustomClientMetadata,
{ corsAllowedOrigins = [] }: CustomClientMetadata,
redirectUris: string[] = []
) => {
const { corsAllowedOrigins = [] } = customClientMetadata;
const redirectUriOrigins = redirectUris.map((uri) => new URL(uri).origin);
return [...corsAllowedOrigins, ...redirectUriOrigins].includes(origin);

View file

@ -136,7 +136,7 @@ const translation = {
post_sign_out_redirect_uri_placeholder: 'https://your.website.com/home',
cors_allowed_origins: 'CORS allowed origins',
cors_allowed_origins_placeholder: 'https://your.website.com',
cors_allowed_origins_tip: 'By default, all your Redirect URIs will be allowed.',
cors_allowed_origins_tip: 'By default, all the origins of Redirect URIs will be allowed.',
add_another: 'Add Another',
id_token_expiration: 'ID Token expiration',
refresh_token_expiration: 'Refresh Token expiration',

View file

@ -132,7 +132,7 @@ const translation = {
post_sign_out_redirect_uri_placeholder: 'https://your.website.com/home',
cors_allowed_origins: 'CORS Allowed Origins',
cors_allowed_origins_placeholder: 'https://your.website.com',
cors_allowed_origins_tip: '所有 Redirect URI 默认为 CORS 所允许。',
cors_allowed_origins_tip: '所有 Redirect URI 的 origin 将默认被允许。',
add_another: '新增',
id_token_expiration: 'ID Token 过期时间',
refresh_token_expiration: 'Refresh Token 过期时间',