<commit_before>import ENV from 'webapp/config/environment';
import Ember from 'ember';

export default {
    name: 'api-server-setup',
    before: ['oauth2-w-auth'],

    initialize: function() {
        if (!Ember.isEmpty(window.SHELVES_API_SERVER)) {
             ENV.APP.API_SERVER = window.SHELVES_API_SERVER;
             ENV.APP.API_BASE = window.SHELVES_API_BASE;
             ENV.APP.API_NAMESPACE = ENV.APP.API_BASE + window.SHELVES_API_NAMESPACE;

             ENV['simple-auth'].crossOriginWhitelist = [ENV.APP.API_SERVER];
             ENV['simple-auth-oauth2'].serverTokenEndpoint = ENV.APP.API_SERVER
                 + (ENV.APP.API_BASE ? '/' + ENV.APP.API_BASE : '') + '/oauth/token';<commit_msg>[webapp] config.js processing has to happen before simple-auth<commit_after>import ENV from 'webapp/config/environment';
import Ember from 'ember';

export default {
    name: 'api-server-setup',
    before: ['oauth2-w-auth', 'simple-auth'],

    initialize: function() {
        if (!Ember.isEmpty(window.SHELVES_API_SERVER)) {
             ENV.APP.API_SERVER = window.SHELVES_API_SERVER;
             ENV.APP.API_BASE = window.SHELVES_API_BASE;
             ENV.APP.API_NAMESPACE = ENV.APP.API_BASE + window.SHELVES_API_NAMESPACE;

             ENV['simple-auth'].crossOriginWhitelist = [ENV.APP.API_SERVER];
             ENV['simple-auth-oauth2'].serverTokenEndpoint = ENV.APP.API_SERVER
                 + (ENV.APP.API_BASE ? '/' + ENV.APP.API_BASE : '') + '/oauth/token';
{'fraction_non_alphanumeric': 0.13844086021505375, 'fraction_numerical': 0.002688172043010753, 'mean_word_length': 2.8575129533678756, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4038054', 'n_tokens_mistral': 518, 'n_tokens_neox': 496, 'n_words': 71}