blob: 461f2f4a5faa1943593b1a6d3449c7661a98eea0 [file] [log] [blame]
Akronc71176d2022-03-14 11:15:07 +01001use Mojo::ByteStream 'b';
Akron85559f02023-09-04 11:42:45 +02002
3$main::ENV{MOJO_MAX_LINE_SIZE} = 65536;
4
Akronc71176d2022-03-14 11:15:07 +01005my $api = 'http://10.0.10.51:9000/api/';
6{
7 Search => {
8 engine => 'Kalamar::API'
9 },
10 'Kalamar-Auth' => {
Akron2e0811c2023-11-03 16:19:00 +010011 client_id => b($app->home->child('.client_id')->slurp)->trim,
12 client_secret => b($app->home->child('.client_secret')->slurp)->trim,
Akronc71176d2022-03-14 11:15:07 +010013 oauth2 => 1,
14 experimental_client_registration => 1
15 },
16 Kalamar => {
17 api_path => $api,
Akron4a118742023-09-04 11:41:46 +020018 log_path => $app->home . '/log',
Akronc71176d2022-03-14 11:15:07 +010019 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 },
38 ],
39 },
40 CSP => {
41 'frame-src' => 'self',
42 'frame-ancestors' => ['self','http://*.ids-mannheim.de/','https://*.ids-mannheim.de/','http://klinux10/']
43 },
44 'Kalamar-Plugins' => {
45 default_plugins => 'default.plugins.json'
46 },
47 Piwik => {
48 url => 'https://stats.ids-mannheim.de',
49 token_auth => '8515ea786127a63a2974de25a0808b00',
50 site_id => 8,
51 embed => 1
52 },
53 hypnotoad => {
54 listen => ['http://*:4348'],
55 workers => 5,
56 inactivity_timeout => 120,
57 proxy => 1
58 },
59 MailException => {
60 from => join('@', 'diewald', 'ids-mannheim.de'),
61 to => join('@', 'diewald', 'ids-mannheim.de'),
62 subject => '[KorAP] Kalamar crashed'
63 },
64 Localize => {
65 dict => {
66 de_loginExplanation => 'Anmeldung mit einem registrierten <%= link_to "Cosmas-II" => "https://perso.ids-mannheim.de/registration/", style => "white-space: nowrap" %>-Konto',
67 en_loginExplanation => 'Login with a registered <%= link_to "Cosmas-II" => "https://perso.ids-mannheim.de/registration/", style => "white-space: nowrap" %> account',
68 en_Nav_privacy => 'Privacy',
69 de_Nav_privacy => 'Datenschutz',
70 de_Nav_corpora => 'Korpora',
71 en_Nav_corpora => 'Corpora',
72 en_howToCite => 'Citation Help',
73 de_howToCite => 'Zitierhilfe',
74 en_recentCorpusPub => 'Recent publications to refer to DeReKo as linguistic research data',
75 de_recentCorpusPub => 'Neuere Publikationen zu DeReKo als linguistische Forschungsdatengrundlage',
Akronbd2b9572023-09-04 11:26:19 +020076 en_recentToolPub => 'Recent publications to refer to KorAP as a research tool',
Akronc71176d2022-03-14 11:15:07 +010077 de_recentToolPub => 'Neuere Publikationen zu KorAP als Forschungswerkzeug',
78 }
79 },
80 'TagHelpers-ContentBlock' => {
81 footer => [
82 {
83 inline => '<%= link_to loc("about") => "https://www.ids-mannheim.de/digspra/kl/projekte/korap/" %>',
84 position => 70
85 },
86 {
87 inline => '<%= link_to loc("howToCite") => url_for(doc => { page => "faq" })->fragment("howToCite") %>',
88 position => 75
89 },
90 {
91 inline => '<%= link_to loc("privacy") => "doc/privacy" %>',
92 position => 90
93 },
94 {
95 inline => '<%= link_to loc("imprint") => "https://www.ids-mannheim.de/allgemein/impressum/" %>',
96 position => 80
97 },
98 ],
99 faq => [
100 {
101 position => 50,
102 inline => <<'HOWTOCITE'
103<section>
104 <h3 id="howToCite"><%= loc 'howToCite' %></h3>
105%= include 'custom/partial/citation'
106</section>
107HOWTOCITE
108 }
109 ],
110 loginInfo => [
111 {
112 inline => '<p><%== loc "loginExplanation" %></p>',
113 position => 50
114 }#,
115# {
116# 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>',
117# position => 100
118# }
119 ]
120 },
121
122 # See Mojolicious::Plugin::CHI
123 CHI => {
124 default => {
125 driver => 'FastMmap',
126 root_dir => app->home . '/cache/data',
127 cache_size => '500m',
128 max_size => '500m'
129 },
130 user => {
131 l1_cache => {
132 driver => 'FastMmap',
133 root_dir => app->home . '/cache/usermap',
134 cache_size => '50m',
135 max_size => '50m'
136 },
137 driver => 'File',
138 root_dir => app->home . '/cache/userfile',
139 max_key_length => 64,
140 max_size => '500m'
141 }
142 }
143};