UNPKG

express-msteams-host

Version:
28 lines 934 B
"use strict"; // Copyright (c) Wictor Wilén. All rights reserved.W // Licensed under the MIT license. Object.defineProperty(exports, "__esModule", { value: true }); exports.PreventIframe = void 0; /** * Decorator that instructs the page router to add files to the list of files to be * protected by a content security policy that does not allow iframes outside of * Microsoft Teams. * The headers are added by the `MsTeamsPageRouter` Expreess router. * The following domains are allowd: * - teams.microsoft.com * - *.teams.microsoft.com * - *.skype.com *.sharepoint.com * - outlook.office.com * - and the current host * @param endpoint The Url */ function PreventIframe(url) { return function (target) { if (target.__addCsp === undefined) { target.__addCsp = []; } target.__addCsp.push(url); }; } exports.PreventIframe = PreventIframe; //# sourceMappingURL=PreventIframe.js.map