fixing config

This commit is contained in:
Matthew Ryan Dillon 2015-10-20 16:46:11 -07:00
commit 38daf6ea5b
47 changed files with 163 additions and 120 deletions

View file

@ -14,36 +14,14 @@ module.exports = function(environment) {
APP: {
genus: 'clostridium',
},
podModulePrefix: 'clostridiumdotinfo/pods',
'simple-auth': {
session: 'session:custom',
authorizer: 'simple-auth-authorizer:token',
store: 'simple-auth-session-store:local-storage',
routeAfterAuthentication: 'protected.index',
},
'simple-auth-token': {
identificationField: 'email',
passwordField: 'password',
tokenPropertyName: 'token',
authorizationPrefix: 'Bearer ',
authorizationHeaderName: 'Authorization',
refreshAccessTokens: true,
timeFactor: 1000, // 1000 ms/s; JWT returned in unix time seconds
refreshLeeway: 1800, // (60 s/min) * (30 min) = 1800 s
},
contentSecurityPolicy: {
'default-src': "'none'",
'script-src': "'self'",
'font-src': "'self'",
'img-src': "'self' data:",
'style-src': "'self' 'unsafe-inline'",
'media-src': "'self'"
},
flashMessageDefaults: {
sticky: true,
type: 'error',
types: ['error', 'warning', 'success', 'information', 'tip', 'message'],
},
'ember-simple-auth': {
routeAfterAuthentication: 'protected.compare',
},
};
var apiURL;
@ -62,11 +40,7 @@ module.exports = function(environment) {
apiURL = 'https://bactdb.herokuapp.com';
}
ENV['simple-auth']['crossOriginWhitelist'] = [apiURL];
ENV['simple-auth-token']['serverTokenEndpoint'] = apiURL + '/api/authenticate';
ENV['simple-auth-token']['serverTokenRefreshEndpoint'] = apiURL + '/api/refresh';
ENV.apiURL = apiURL;
ENV.contentSecurityPolicy['connect-src'] = "'self' " + apiURL;
return ENV;
};