My application, at test.my-application.com for example, uses a Iron Router server side route to process data and generate a pdf. Since it’s just a server side route, there’s no integration with the Meteor accounts package. Therefore I’m using the mrt:cookies package to handle tokens and to search the Meteor.users collection.
This works fine.
But once I install the Meteor browser-policy package, and added the following code:
// server/policy.js
BrowserPolicy.framing.disallow();
BrowserPolicy.content.disallowInlineScripts();
BrowserPolicy.content.disallowEval();
BrowserPolicy.content.allowInlineStyles();
BrowserPolicy.content.allowFontDataUrl();
var trusted = [
'*.google-analytics.com'
];
_.each(trusted, function(origin) {
origin = "https://" + origin;
BrowserPolicy.content.allowOriginForAll(origin);
});
When I ran the server side route, I get what looks like a bunch of garbage returned, instead of a proper pdf like before.
What am I doing wrong?