Skip to content

Instantly share code, notes, and snippets.

@xet7
Created June 25, 2018 23:34
Show Gist options
  • Save xet7/09d84ee2fd91649ecd75bae42461460d to your computer and use it in GitHub Desktop.
Save xet7/09d84ee2fd91649ecd75bae42461460d to your computer and use it in GitHub Desktop.
frame and iframe restrictions config example, in progress
import Fiber from 'fibers';
if (Meteor.isServer) {
// Have these settings in environment variables
// Allow Wekan in iframe only from this domain
BrowserPolicy.framing.restrictToOrigin('https://example.com')
BrowserPolicy.content.allowFrameAncestorsOrigin('https://example.com')
// Allow Wekan cards to have images from <img src='https://image.example.com' /> only
BrowserPolicy.content.allowImageOrigin('https://image.example.com,https://image.domain.com')
// Allow Wekan cards to have frame/iframe that embeds these websites. I did not get it working.
BrowserPolicy.content.allowFrameOrigin('https://stats.example.com')
Meteor.startup(() => {
// ... etc code from wekan/server/authentication.js
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment