fix(wechat): trust configured imgproxy generated images
Memind CI / Test, build, and release guards (pull_request) Successful in 2m56s
Memind CI / Test, build, and release guards (pull_request) Successful in 2m56s
This commit is contained in:
@@ -859,10 +859,15 @@ test('loadWechatMpConfig requires full config and enable flag', () => {
|
||||
H5_WECHAT_MP_APP_SECRET: 'secret',
|
||||
H5_WECHAT_MP_TOKEN: 'token',
|
||||
H5_PUBLIC_BASE_URL: 'https://example.com',
|
||||
IMGPROXY_BASE_URL: 'https://img.example.com',
|
||||
});
|
||||
assert.equal(config.enabled, true);
|
||||
assert.equal(config.bindPath, '/auth/wechat/authorize?intent=login');
|
||||
assert.equal(config.requireFreshPageThumbnail, true);
|
||||
assert.deepEqual(config.generatedImagePublicBaseUrls, [
|
||||
'https://example.com',
|
||||
'https://img.example.com',
|
||||
]);
|
||||
assert.equal(loadWechatMpConfig({ H5_WECHAT_MP_FRESH_PAGE_THUMBNAILS: '0' }).requireFreshPageThumbnail, false);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user