Created
June 25, 2018 23:34
-
-
Save xet7/09d84ee2fd91649ecd75bae42461460d to your computer and use it in GitHub Desktop.
frame and iframe restrictions config example, in progress
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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