-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.yml
101 lines (78 loc) · 2.36 KB
/
config.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
# === Main ===
layout: 'control_panel'
charset: 'UTF-8'
# If set to true, Dancer2 will look to X-Forwarded-Protocol and X-Forwarded-host.
behind_proxy: 1
# If set to true, Dancer2 will not add an "X-Powered-By" header and also
# append the Dancer2 version to the "Server" header.
no_server_tokens: 1
# Template engine.
template: 'Xslate'
# Session engine.
session: 'Redis'
# Custom dsl.
dsl_class: 'Dsl'
# === Engines ===
engines:
# Dancer2::Template::Xslate.
template:
Xslate:
location: 'views'
module:
- 'Text::Xslate::Bridge::Star'
# === Plugins ===
plugins:
# Dancer2::Plugin::Auth::Extensible::Provider::DBIC.
Auth::Extensible:
realms:
users:
provider: 'DBIC'
# get_user_details return an inflated DBIC object.
user_as_object: 1
# Schema.
users_resultset: User
roles_resultset: Role
user_roles_resultset: UserRoles
# Columns.
users_username_column: username
users_password_column: password
roles_role_column: role
users_lastlogin_column: lastlogin
users_pwresetcode_column: pw_reset_code
users_pwchanged_column: pw_changed
# Days after which passwords expire.
password_expiry_days: 30
# Optionally set additional conditions when searching for the
# user in the database. These are the same format as required
# by DBIC, and are passed directly to the DBIC resultset search.
user_valid_conditions:
deleted: 0
# Key for the user's roles to be returned in.
roles_key: roles
# Optionally specify the algorithm when encrypting new passwords.
encryption_algorithm: SHA-256
# Not using DPAE routes and pages.
no_default_pages: 1
# no_login_handler: 1
record_lastlogin: 1
# Dancer2::Plugin::FormValidator.
FormValidator:
session:
namespace: '_form_validator'
messages:
language: en
ucfirst: 1
extensions:
password:
provider: 'Dancer2::Plugin::FormValidator::Extension::Password'
dbic:
provider: 'Dancer2::Plugin::FormValidator::Extension::DBIC'
database: 'default'
# Dancer2::Plugin::CSRFI
CSRFI:
session_key: '_csrf'
template_token: 'csrf_token'
validate_post: 1
field_name: 'csrf_token'
error_status: 419
error_message: 'Page expired'