Scrubbing out test server --- going to use golang dev server

This commit is contained in:
Matthew Dillon 2015-06-28 19:58:42 -08:00
parent 5914360cc6
commit de15fd0a30
11 changed files with 11 additions and 872 deletions

View file

@ -41,30 +41,26 @@ module.exports = function(environment) {
},
};
var apiURL;
if (environment === 'development') {
ENV['simple-auth']['crossOriginWhitelist'] = ['http://127.0.0.1:4200'];
ENV['simple-auth-token']['serverTokenEndpoint'] = '/api/authenticate';
ENV.apiURL = 'http://127.0.0.1:4200';
ENV.contentSecurityPolicy['connect-src'] = "'self' http://127.0.0.1:4200";
apiURL = 'http://127.0.0.1:8901';
}
if (environment === 'test') {
ENV['simple-auth']['crossOriginWhitelist'] = ['https://bactdb-test.herokuapp.com'];
ENV['simple-auth-token']['serverTokenEndpoint'] = 'https://bactdb-test.herokuapp.com/api/authenticate';
ENV.apiURL = 'https://bactdb-test.herokuapp.com';
ENV.contentSecurityPolicy['connect-src'] = "'self' https://bactdb-test.herokuapp.com";
// keep test console output quieter
apiURL = 'https://bactdb-test.herokuapp.com';
ENV.APP.LOG_ACTIVE_GENERATION = false;
ENV.APP.LOG_VIEW_LOOKUPS = false;
}
if (environment === 'production') {
ENV['simple-auth']['crossOriginWhitelist'] = ['https://bactdb.herokuapp.com'];
ENV['simple-auth-token']['serverTokenEndpoint'] = 'https://bactdb.herokuapp.com/api/authenticate';
ENV.apiURL = 'https://bactdb.herokuapp.com';
ENV.contentSecurityPolicy['connect-src'] = "'self' https://bactdb.herokuapp.com";
apiURL = 'https://bactdb.herokuapp.com';
}
ENV['simple-auth']['crossOriginWhitelist'] = [apiURL];
ENV['simple-auth-token']['serverTokenEndpoint'] = apiURL + '/api/authenticate';
ENV.apiURL = apiURL;
ENV.contentSecurityPolicy['connect-src'] = "'self' " + apiURL;
return ENV;
};