mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-09-21 05:16:20 -07:00
fix(stats): restrict local requests and serve the dashboard over HTTP (#263)
This commit is contained in:
@@ -169,14 +169,14 @@ test('CoverImage renders explicit remote artwork when src is provided', () => {
|
||||
test('MediaCard uses the proxied cover endpoint instead of metadata artwork urls', () => {
|
||||
const markup = renderToStaticMarkup(<MediaCard item={youtubeEpisodeA} onClick={() => {}} />);
|
||||
|
||||
assert.match(markup, /src="http:\/\/127\.0\.0\.1:6969\/api\/stats\/media\/1\/cover"/);
|
||||
assert.match(markup, /src="\/api\/stats\/media\/1\/cover"/);
|
||||
assert.doesNotMatch(markup, /https:\/\/i\.ytimg\.com\/vi\/yt-1\/hqdefault\.jpg/);
|
||||
});
|
||||
|
||||
test('resolveMediaCoverApiUrl appends retry tokens for late cover refreshes', () => {
|
||||
assert.equal(
|
||||
resolveMediaCoverApiUrl(youtubeEpisodeA.videoId, 2),
|
||||
'http://127.0.0.1:6969/api/stats/media/1/cover?coverRetry=2',
|
||||
'/api/stats/media/1/cover?coverRetry=2',
|
||||
);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user