Last active
December 19, 2015 08:49
-
-
Save cwaring/5928926 to your computer and use it in GitHub Desktop.
Meteor basic auth
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
Meteor.startup(function() { | |
var connect = Meteor.require('connect'); | |
WebApp.connectHandlers.use(connect.basicAuth('un', 'pw')); | |
// move auth to the top of the stack | |
var basicAuth = WebApp.connectHandlers.stack.pop(); | |
WebApp.connectHandlers.stack.unshift(basicAuth); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment