<commit_before>package WGE;
use Moose;
use namespace::autoclean;

use Catalyst::Runtime 5.80;

# Set flags and add plugins for the application.
#
# Note that ORDERING IS IMPORTANT here as plugins are initialized in order,
# therefore you almost certainly want to keep ConfigLoader at the head of the
# list if you're using it.
#
#         -Debug: activates the debug mode for very useful log messages
#   ConfigLoader: will load the configuration from a Config::General file in the
#                 application's home directory
# Static::Simple: will serve static files from the application's root
#                 directory

use Catalyst qw/
    -Debug
    ConfigLoader
    Static::Simple
    Authentication
    Authorization::Roles
    Session
    Session::Store::FastMmap
    Session::State::Cookie    
/;

use Log::Log4perl::Catalyst;

extends 'Catalyst';

our $VERSION = '0.01';

__PACKAGE__->log(Log::Log4perl::Catalyst->new());

# Configure the application.
#
# Note that settings in wge.conf (or other external
# configuration file that you set up manually) take precedence
# over this when using ConfigLoader. Thus configuration
# details given here can function as a default configuration,
# with an external configuration file acting as an override for
# local deployment.

__PACKAGE__->config(
    name => 'WGE',
    # Disable deprecated behavior needed by old applications
    disable_component_resolution_regex_fallback => 1,
    enable_catalyst_header => 1, # Send X-Catalyst header
    default_model => 'DB',
    default_view => 'Web',
    'View::Web' => {
        INCLUDE_PATH => [
            __PACKAGE__->path_to( 'root' ),
            __PACKAGE__->path_to( 'root', 'gibson' ),
            __PACKAGE__->path_to( 'root', 'site' ),          
            $ENV{SHARED_WEBAPP_TT_DIR} || '/opt/t87/global/software/perl/lib/perl5/WebAppCommon/shared_templates',
            ],
    },
    'View::JSON' => { expose_stash => 'json_data' },
    'static' => {
        include_path => [
            $ENV{SHARED_WEBAPP_STATIC_DIR} || '/opt/t87/global/software/perl/lib/perl5/WebAppCommon/shared_static',
            __PACKAGE__->path_to( 'root' ),
        ],
    },
    'Plugin::Session' => {
        storage => $ENV{WGE_SESSION_STORE} || '/tmp/wge',
    },
    authentication => {
        use_session => 0,
        default_realm => 'rest_client',
        realms => {
            rest_client => {
                credential => {
                    class => 'Password',
                    password_field => 'password',
                    password_type => '<PASSWORD>',
                    password_salt_len => '4',<commit_msg>remove debug flag. set to use frontend proxy so live app generates correct urls<commit_after>package WGE;
use Moose;
use namespace::autoclean;

use Catalyst::Runtime 5.80;

# Set flags and add plugins for the application.
#
# Note that ORDERING IS IMPORTANT here as plugins are initialized in order,
# therefore you almost certainly want to keep ConfigLoader at the head of the
# list if you're using it.
#
#         -Debug: activates the debug mode for very useful log messages
#   ConfigLoader: will load the configuration from a Config::General file in the
#                 application's home directory
# Static::Simple: will serve static files from the application's root
#                 directory

use Catalyst qw/
    ConfigLoader
    Static::Simple
    Authentication
    Authorization::Roles
    Session
    Session::Store::FastMmap
    Session::State::Cookie    
/;

use Log::Log4perl::Catalyst;

extends 'Catalyst';

our $VERSION = '0.01';

__PACKAGE__->log(Log::Log4perl::Catalyst->new());

# Configure the application.
#
# Note that settings in wge.conf (or other external
# configuration file that you set up manually) take precedence
# over this when using ConfigLoader. Thus configuration
# details given here can function as a default configuration,
# with an external configuration file acting as an override for
# local deployment.

__PACKAGE__->config(
    name => 'WGE',
    # Disable deprecated behavior needed by old applications
    disable_component_resolution_regex_fallback => 1,
    enable_catalyst_header => 1, # Send X-Catalyst header
    using_frontend_proxy => 1,
    default_model => 'DB',
    default_view => 'Web',
    'View::Web' => {
        INCLUDE_PATH => [
            __PACKAGE__->path_to( 'root' ),
            __PACKAGE__->path_to( 'root', 'gibson' ),
            __PACKAGE__->path_to( 'root', 'site' ),          
            $ENV{SHARED_WEBAPP_TT_DIR} || '/opt/t87/global/software/perl/lib/perl5/WebAppCommon/shared_templates',
            ],
    },
    'View::JSON' => { expose_stash => 'json_data' },
    'static' => {
        include_path => [
            $ENV{SHARED_WEBAPP_STATIC_DIR} || '/opt/t87/global/software/perl/lib/perl5/WebAppCommon/shared_static',
            __PACKAGE__->path_to( 'root' ),
        ],
    },
    'Plugin::Session' => {
        storage => $ENV{WGE_SESSION_STORE} || '/tmp/wge',
    },
    authentication => {
        use_session => 0,
        default_realm => 'rest_client',
        realms => {
            rest_client => {
                credential => {
                    class => 'Password',
                    password_field => 'password',
                    password_type => '<PASSWORD>',
                    password_salt_len => '4',
{'fraction_non_alphanumeric': 0.109596713965646, 'fraction_numerical': 0.006908140403286034, 'mean_word_length': 2.684319119669876, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 66, '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': '2514964', 'n_tokens_mistral': 1599, 'n_tokens_neox': 1523, 'n_words': 433}