Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/ember.js/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在Ember.JS中,如何安全地加载敏感环境数据?_Ember.js - Fatal编程技术网

在Ember.JS中,如何安全地加载敏感环境数据?

在Ember.JS中,如何安全地加载敏感环境数据?,ember.js,Ember.js,在/config/environment.js中: /* jshint node: true */ module.exports = function(environment) { var ENV = { modulePrefix: 'bumbox', podModulePrefix: 'bumbox/pods', environment: environment, baseURL: '/', locationType: 'auto', Em

/config/environment.js
中:

/* jshint node: true */

module.exports = function(environment) {
  var ENV = {
    modulePrefix: 'bumbox',
    podModulePrefix: 'bumbox/pods',
    environment: environment,
    baseURL: '/',
    locationType: 'auto',
    EmberENV: {
      FEATURES: {
        // Here you can enable experimental features on an ember canary build
        // e.g. 'with-controller': true
      }
    },

    APP: {
      // Here you can pass flags/options to your application instance
      // when it is created
    }
  };

  if (environment === 'development') {
    // ENV.APP.LOG_RESOLVER = true;
    // ENV.APP.LOG_ACTIVE_GENERATION = true;
    // ENV.APP.LOG_TRANSITIONS = true;
    // ENV.APP.LOG_TRANSITIONS_INTERNAL = true;
    // ENV.APP.LOG_VIEW_LOOKUPS = true;
  }

  if (environment === 'test') {
    // Testem prefers this...
    ENV.baseURL = '/';
    ENV.locationType = 'none';

    // keep test console output quieter
    ENV.APP.LOG_ACTIVE_GENERATION = false;
    ENV.APP.LOG_VIEW_LOOKUPS = false;

    ENV.APP.rootElement = '#ember-testing';
  }

  ENV['ember-simple-auth'] = {
    authenticationRoute: 'index',
    routeAfterAuthentication: 'protected',
    routeIfAlreadyAuthenticated: 'protected'
  };

  return ENV;
};
我有一些属性需要添加到
ENV
对象中,但我宁愿将这些属性存储在一个单独的
.gitignore
'd文件中,所以我不会将它们发布到github。类似于
/config/protected.js

项目就是您想要的

即使是关于如何设置和使用
ember cli dotenv
ember的视频,也会播放关于使用ember cli dotenv的视频

即使是关于如何设置和使用
ember cli dotenv
ember屏幕也会播放关于使用ember cli dotenv的视频