-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaah.conf
158 lines (142 loc) · 5.58 KB
/
aah.conf
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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
# -----------------------------------------------------------------------------
# form-based-auth - aah Application Configuration
#
# Refer documentation to explore and customize the configurations.
# Doc: https://docs.aahframework.org/app-config.html
# -----------------------------------------------------------------------------
# Application name (non-whitespace)
# Default value is `basename` of import path.
name = "form-based-auth"
# Friendly description of application
desc = "aah framework form based auth web application"
# Application type, typically these `web`, `api`, `websocket`
type = "web"
# -----------------------------------------------------------------------------
# Server configuration
# Doc: https://docs.aahframework.org/app-config.html#section-server
# -----------------------------------------------------------------------------
server {
# Address is used to bind against host address, IP address, UNIX socket.
#
# For unix socket: unix:/tmp/aahframework.sock
# Default value is `empty` string.
#address = ""
# Port is used to bind server listener on particular port.
#
# For standard port `80` and `443`, put empty string or a value
# Default value is 8080.
#port = ""
# Header value is written as HTTP header `Server: aah-go-server`.
#
# To exclude header `Server` from writing, simply comment it out.
header = "aah-go-server"
}
database {
driver = "mysql"
host = "localhost"
port = "3306"
username = "root"
password = "mysql"
name = "aah-form-based-auth"
max_idle_connections = 20
max_active_connections = 30
max_connection_lifetime = 2
}
# -----------------------------------------------------------------------------
# Request configuration
# Doc: https://docs.aahframework.org/app-config.html#section-request
# -----------------------------------------------------------------------------
request {
# -----------------------------------------------------------------------------
# aah framework encourages to have a unique `Request Id` for each incoming
# request. It helps in traceability. If a request already has `X-Request-Id`
# HTTP header, then aah does not generate one.
#
# GUID is generated using MongoDB ObjectId algorithm.
#
# Doc: https://docs.aahframework.org/app-config.html#section-request-id
# -----------------------------------------------------------------------------
id {
enable = true
}
}
# -----------------------------------------------------------------------------
# Render configuration
# Doc: https://docs.aahframework.org/app-config.html#section-render
# -----------------------------------------------------------------------------
render {
# aah infers the `Content-Type` automatically, if `Reply()` builder does not have value.
#
# It infers in the order of:
# - URL file extension - supports `.html`, `.htm`, `.json`, `.js`, `.xml`
# and `.txt`
# - Request Accept Header - Most Qualified one as per RFC 7321
# * Supports vendor type as per RFC 4288
# - Fallback to `render.default` value - supports `html`, `json`, `xml` and `text`
#
# Default value is `empty` string.
default = "html"
}
# -----------------------------------------------------------------------------
# Cache configuration
# Doc: https://docs.aahframework.org/app-config.html#section-cache
# -----------------------------------------------------------------------------
cache {
# -----------------------------------------------------------------------------
# HTTP Cache-Control Configuration for Static files
# Doc: https://docs.aahframework.org/static-files.html#http-cache-control
# -----------------------------------------------------------------------------
static {
# Default `Cache-Control` for all static files, if specific is not defined.
default_cache_control = "public, max-age=31536000"
# Define by mime types, if mime is not present then default is applied.
# Config is very flexible to define by mime type.
#
# Create a unique name and provide `mime` with comma separated value
# and `cache_control`.
# mime_types {
# css_js {
# mime = "text/css, application/javascript"
# cache_control = "public, max-age=604800, proxy-revalidate"
# }
#
# images {
# mime = "image/jpeg, image/png, image/gif, image/svg+xml, image/x-icon"
# cache_control = "public, max-age=2628000, proxy-revalidate"
# }
# }
}
}
# -----------------------------------------------------------------------------
# View configuration
# Doc: https://docs.aahframework.org/app-config.html#section-view
# -----------------------------------------------------------------------------
view {
engine = "go"
ext = ".html"
delimiters = "{{.}}"
}
# -----------------------------------------------------------------------------
# Security configuration
# Doc: https://docs.aahframework.org/security-config.html
# -----------------------------------------------------------------------------
include "./security.conf"
# -----------------------------------------------------------------------------
# Environment Profiles
#
# For e.g.: dev, qa, prod, etc.
#
# Doc: https://docs.aahframework.org/app-config.html#section-env
# -----------------------------------------------------------------------------
env {
# Active profile name for the application configuration.
#
# For e.g.: To activate environment profile via application binary
# /path/to/binary/aahwebsite -profile prod
#
# Default value is `dev`.
#active = "dev"
# Environment profile configurations
# Load all the configuration files from `appbasedir/config/env/*.conf`.
include "./env/*.conf"
}