Skip to content
This repository was archived by the owner on Oct 24, 2021. It is now read-only.
This repository was archived by the owner on Oct 24, 2021. It is now read-only.

BrowserPolicy #16

@abernix

Description

@abernix

Moved from meteor/meteor#6766:

The solution was that in order to use BrowserPolicy it must be included! But from where!?

From Here:

import { BrowserPolicy } from 'meteor/browser-policy-common';

I guess this entire package needs to be documented? There is some debate in #6766 about whether it should be from browser-policy-common or browser-policy, but either way, this needs to be documented and it's likely that it can be exported from both for reverse-compatibility.

Original Issue

I have installed the browser-policy package (meteor add browser-policy) and set up some rules:

BrowserPolicy.framing.disallow();
BrowserPolicy.content.disallowEval();
BrowserPolicy.content.disallowObject();
BrowserPolicy.content.disallowInlineScripts();
BrowserPolicy.content.disallowFont();

The Meteor Guide recommends the Airbnb javascript style guide, which requires that BrowserPolicy be defined/imported before making the above declarations. Not being able to import the BrowserPolicy variable results in ESLint errors, which causes the test suite (meteor npm run test) to fail.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions