Improve tests when waiting pending jobs
[oweals/peertube.git] / server / controllers / services.ts
index c272edccd5196256d93089544d7388e2f11cfd90..1dd8e28e5e1c64d39f6e5899c59ed52d57cdbf6a 100644 (file)
@@ -10,7 +10,7 @@ servicesRouter.use('/oembed',
   asyncMiddleware(oembedValidator),
   generateOEmbed
 )
-servicesRouter.use('/redirect/accounts/:nameWithHost',
+servicesRouter.use('/redirect/accounts/:accountName',
   asyncMiddleware(accountsNameWithHostGetValidator),
   redirectToAccountUrl
 )
@@ -45,7 +45,8 @@ function generateOEmbed (req: express.Request, res: express.Response, next: expr
     thumbnailUrl = undefined
   }
 
-  const html = `<iframe width="${embedWidth}" height="${embedHeight}" src="${embedUrl}" frameborder="0" allowfullscreen></iframe>`
+  const html = `<iframe width="${embedWidth}" height="${embedHeight}" sandbox="allow-same-origin allow-scripts" ` +
+    `src="${embedUrl}" frameborder="0" allowfullscreen></iframe>`
 
   const json: any = {
     type: 'video',