Akron | c71176d | 2022-03-14 11:15:07 +0100 | [diff] [blame] | 1 | use Mojo::ByteStream 'b'; |
Akron | 85559f0 | 2023-09-04 11:42:45 +0200 | [diff] [blame] | 2 | |
| 3 | $main::ENV{MOJO_MAX_LINE_SIZE} = 65536; |
| 4 | |
Akron | c71176d | 2022-03-14 11:15:07 +0100 | [diff] [blame] | 5 | my $api = 'http://10.0.10.51:9000/api/'; |
| 6 | { |
| 7 | Search => { |
| 8 | engine => 'Kalamar::API' |
| 9 | }, |
| 10 | 'Kalamar-Auth' => { |
Akron | 2e0811c | 2023-11-03 16:19:00 +0100 | [diff] [blame] | 11 | client_id => b($app->home->child('.client_id')->slurp)->trim, |
| 12 | client_secret => b($app->home->child('.client_secret')->slurp)->trim, |
Akron | c71176d | 2022-03-14 11:15:07 +0100 | [diff] [blame] | 13 | oauth2 => 1, |
| 14 | experimental_client_registration => 1 |
| 15 | }, |
| 16 | Kalamar => { |
| 17 | api_path => $api, |
Akron | 4a11874 | 2023-09-04 11:41:46 +0200 | [diff] [blame] | 18 | log_path => $app->home . '/log', |
Akron | c71176d | 2022-03-14 11:15:07 +0100 | [diff] [blame] | 19 | secure_cookie => 1, |
| 20 | https_only => 1, |
| 21 | plugins => ['Auth', 'Piwik','Plugins'], |
| 22 | experimental_proxy => 1, |
| 23 | proxy_inactivity_timeout => 120, |
| 24 | proxy_connect_timeout => 120, |
| 25 | Piwik => { |
| 26 | ping_requests => 1, |
| 27 | ping_site_id => 13 |
| 28 | }, |
| 29 | navi_ext => [ |
| 30 | { |
| 31 | "title" => "corpora", |
| 32 | "id" => "corpus" |
| 33 | }, |
| 34 | { |
| 35 | "title" => "Privacy", |
| 36 | "id" => "privacy" |
| 37 | }, |
Akron | 8dbf9c6 | 2024-03-20 17:24:15 +0100 | [diff] [blame] | 38 | { |
| 39 | "title" => "News", |
| 40 | "id" => "news" |
| 41 | }, |
Akron | c71176d | 2022-03-14 11:15:07 +0100 | [diff] [blame] | 42 | ], |
| 43 | }, |
| 44 | CSP => { |
| 45 | 'frame-src' => 'self', |
| 46 | 'frame-ancestors' => ['self','http://*.ids-mannheim.de/','https://*.ids-mannheim.de/','http://klinux10/'] |
| 47 | }, |
| 48 | 'Kalamar-Plugins' => { |
| 49 | default_plugins => 'default.plugins.json' |
| 50 | }, |
| 51 | Piwik => { |
| 52 | url => 'https://stats.ids-mannheim.de', |
| 53 | token_auth => '8515ea786127a63a2974de25a0808b00', |
| 54 | site_id => 8, |
| 55 | embed => 1 |
| 56 | }, |
| 57 | hypnotoad => { |
| 58 | listen => ['http://*:4348'], |
| 59 | workers => 5, |
| 60 | inactivity_timeout => 120, |
| 61 | proxy => 1 |
| 62 | }, |
| 63 | MailException => { |
| 64 | from => join('@', 'diewald', 'ids-mannheim.de'), |
| 65 | to => join('@', 'diewald', 'ids-mannheim.de'), |
| 66 | subject => '[KorAP] Kalamar crashed' |
| 67 | }, |
| 68 | Localize => { |
| 69 | dict => { |
| 70 | de_loginExplanation => 'Anmeldung mit einem registrierten <%= link_to "Cosmas-II" => "https://perso.ids-mannheim.de/registration/", style => "white-space: nowrap" %>-Konto', |
| 71 | en_loginExplanation => 'Login with a registered <%= link_to "Cosmas-II" => "https://perso.ids-mannheim.de/registration/", style => "white-space: nowrap" %> account', |
| 72 | en_Nav_privacy => 'Privacy', |
| 73 | de_Nav_privacy => 'Datenschutz', |
| 74 | de_Nav_corpora => 'Korpora', |
| 75 | en_Nav_corpora => 'Corpora', |
| 76 | en_howToCite => 'Citation Help', |
| 77 | de_howToCite => 'Zitierhilfe', |
| 78 | en_recentCorpusPub => 'Recent publications to refer to DeReKo as linguistic research data', |
| 79 | de_recentCorpusPub => 'Neuere Publikationen zu DeReKo als linguistische Forschungsdatengrundlage', |
Akron | bd2b957 | 2023-09-04 11:26:19 +0200 | [diff] [blame] | 80 | en_recentToolPub => 'Recent publications to refer to KorAP as a research tool', |
Akron | c71176d | 2022-03-14 11:15:07 +0100 | [diff] [blame] | 81 | de_recentToolPub => 'Neuere Publikationen zu KorAP als Forschungswerkzeug', |
| 82 | } |
| 83 | }, |
| 84 | 'TagHelpers-ContentBlock' => { |
| 85 | footer => [ |
| 86 | { |
| 87 | inline => '<%= link_to loc("about") => "https://www.ids-mannheim.de/digspra/kl/projekte/korap/" %>', |
| 88 | position => 70 |
| 89 | }, |
| 90 | { |
Akron | 5b7e0c5 | 2024-04-12 12:03:09 +0200 | [diff] [blame] | 91 | inline => '<%= link_to loc("news") => url_for(doc => {page => "news" }) %>', |
Akron | 8dbf9c6 | 2024-03-20 17:24:15 +0100 | [diff] [blame] | 92 | position => 72 |
| 93 | }, |
| 94 | { |
Akron | c71176d | 2022-03-14 11:15:07 +0100 | [diff] [blame] | 95 | inline => '<%= link_to loc("howToCite") => url_for(doc => { page => "faq" })->fragment("howToCite") %>', |
| 96 | position => 75 |
| 97 | }, |
| 98 | { |
Akron | 5b7e0c5 | 2024-04-12 12:03:09 +0200 | [diff] [blame] | 99 | inline => '<%= link_to loc("privacy") => url_for(doc => { page => "privacy" }) %>', |
Akron | c71176d | 2022-03-14 11:15:07 +0100 | [diff] [blame] | 100 | position => 90 |
| 101 | }, |
| 102 | { |
| 103 | inline => '<%= link_to loc("imprint") => "https://www.ids-mannheim.de/allgemein/impressum/" %>', |
| 104 | position => 80 |
| 105 | }, |
| 106 | ], |
| 107 | faq => [ |
| 108 | { |
| 109 | position => 50, |
| 110 | inline => <<'HOWTOCITE' |
| 111 | <section> |
| 112 | <h3 id="howToCite"><%= loc 'howToCite' %></h3> |
| 113 | %= include 'custom/partial/citation' |
| 114 | </section> |
| 115 | HOWTOCITE |
| 116 | } |
| 117 | ], |
| 118 | loginInfo => [ |
| 119 | { |
| 120 | inline => '<p><%== loc "loginExplanation" %></p>', |
| 121 | position => 50 |
| 122 | }#, |
| 123 | # { |
| 124 | # inline => '<p class="announcement"><time datetime="2018-05-24">24.05.2018</time> Um weitere Anwendungen für die Nutzung von DeReKo anbieten zu können, haben wir die <%= link_to "Nutzungsvereinbarung", "https://www.ids-mannheim.de/cosmas2/projekt/registrierung/Nutzungsvereinbarung.html" %> angepasst!</p>', |
| 125 | # position => 100 |
| 126 | # } |
| 127 | ] |
| 128 | }, |
| 129 | |
| 130 | # See Mojolicious::Plugin::CHI |
| 131 | CHI => { |
| 132 | default => { |
| 133 | driver => 'FastMmap', |
| 134 | root_dir => app->home . '/cache/data', |
| 135 | cache_size => '500m', |
| 136 | max_size => '500m' |
| 137 | }, |
| 138 | user => { |
| 139 | l1_cache => { |
| 140 | driver => 'FastMmap', |
| 141 | root_dir => app->home . '/cache/usermap', |
| 142 | cache_size => '50m', |
| 143 | max_size => '50m' |
| 144 | }, |
| 145 | driver => 'File', |
| 146 | root_dir => app->home . '/cache/userfile', |
| 147 | max_key_length => 64, |
| 148 | max_size => '500m' |
| 149 | } |
| 150 | } |
| 151 | }; |