Allow embed to be displayed on instance

This commit is contained in:
Chocobozzz
2026-06-15 10:31:10 +02:00
parent ccdfe7bf51
commit 636bee55e1
2 changed files with 16 additions and 2 deletions
@@ -106,6 +106,19 @@ describe('Test video embed privacy', function () {
}
})
it('Should check if embed is allowed on origin instance', async function () {
{
const result = await servers[0].videoEmbedPrivacy.isDomainAllowed({ videoId, domain: servers[0].host })
expect(result).to.deep.equal({ domainAllowed: true, userBypassAllowed: null })
}
{
// Port is missing
const result = await servers[0].videoEmbedPrivacy.isDomainAllowed({ videoId, domain: servers[0].hostname, token: null })
expect(result).to.deep.equal({ domainAllowed: false, userBypassAllowed: false })
}
})
it('Should add some domains to video embed privacy', async function () {
await servers[0].videoEmbedPrivacy.update({
videoId,