Files
meteor/packages/force-ssl/package.js
David Glasser 2d827e74fc Factor webapp-specific stuff (and keepalive) out of boot.js into webapp package.
Replace type: "bare" with type: "server" in attributes.json.  This now just
means "only make one server process" rather than controlling the boot script.

Programs that are type: "traditional" that want to be a webapp now need to
explicitly depend on the webapp package.
2013-05-13 11:58:58 -07:00

20 lines
725 B
JavaScript

Package.describe({
summary: "Require this application to use secure transport (HTTPS)"
});
Package.on_use(function (api) {
api.use('webapp', 'server');
api.use('underscore', 'server');
// make sure we come after livedata, so we load after the sockjs
// server has been instantiated.
api.use('livedata', 'server');
api.add_files('force_ssl_common.js', ['client', 'server']);
api.add_files('force_ssl_server.js', 'server');
// Another thing we could do is add a force_ssl_client.js file that
// makes sure document.location.protocol is 'https'. If it detected
// the code was loaded from a non-localhost non-https site, it would
// stop the app from working and pop up an error box or something.
});