This file contains 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
// Respect do not track for all browsers. Except for IE 10 and 11 where we ignore it | |
var dnt_isIe10or11 = (navigator.appVersion.indexOf("MSIE 10") !== -1) || (navigator.userAgent.indexOf("Trident") !== -1 && navigator. userAgent.indexOf("rv:11") !== -1); | |
var DNT = (navigator.doNotTrack || navigator.msDoNotTrack || window.doNotTrack); | |
DNT = !DNT || DNT == "unspecified" || DNT == "0" ? false : true; | |
if (!DNT || dnt_isIe10or11) { | |
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); | |
// GA loading code | |
} |
This file contains 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
app.use(function (req, res, next) { | |
var sslUrl; | |
if (process.env.NODE_ENV === 'production' && | |
req.headers['x-forwarded-proto'] !== 'https') { | |
sslUrl = ['https://hjnilsson.com', req.url].join(''); | |
return res.redirect(sslUrl); | |
} |
This file contains 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
app.use(function (req, res, next) { | |
var newURL; | |
// If not on HTTPS, or not on the main domain, redirect | |
if (process.env.NODE_ENV === 'production' && | |
(req.headers['x-forwarded-proto'] !== 'https' || req.headers.host !== 'hjnilsson.com')) { | |
newURL = ['https://hjnilsson.com', req.url].join(''); | |
return res.redirect(newURL); | |
} |
This file contains 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 Constants from '../Constants'; | |
import {EventEmitter} from 'events'; | |
let _listenerArguments = {}; | |
let _listenerIds = 1; | |
export default _.assign({}, EventEmitter.prototype, { | |
// Allow Controller-View to register itself with store | |
addChangeListener(listener) { |
This file contains 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
// Set up the ADAL instance, we will use the throughout the app | |
export var adalInstance = new AuthenticationContext({ | |
instance: 'https://login.microsoftonline.com/', | |
// The client ID of the app from the Azure Portal | |
clientId: 'aabbccee-aabb-1122-3344-556677889900', | |
// Where do we want to go after logging out | |
postLogoutRedirectUri: window.location.origin, | |