You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -68,244 +68,18 @@ There are a few environment variables that the remote configuration files are se
68
68
69
69
If you DO NOT like this behavior, and would prefer the variables stay the same across your environments, feel free to change them in [`config/env/development.js`](config/env/development.js) and [`config/env/production.js`](config/env/production.js)
70
70
71
-
<table>
72
-
<thead>
73
-
<th colspan="2">Variable</th>
74
-
<th>Default</th>
75
-
<th>Description</th>
76
-
</thead>
77
-
<tbody>
78
-
<tr>
79
-
<td style="text-align: right">
80
-
<strong>DEV</strong>
81
-
</td>
82
-
<td>
83
-
ASSETS_URL
84
-
</td>
85
-
<td rowspan="2">
86
-
"" (empty string)
87
-
</td>
88
-
<td rowspan="2">
89
-
Webpack is configured to modify static asset URLs to point to a CDN, like CloudFront. MUST end with a slash " / ", or be empty.
90
-
</td>
91
-
</tr>
92
-
<tr>
93
-
<td style="text-align: right">
94
-
<strong>PROD</strong>
95
-
</td>
96
-
<td>
97
-
ASSETS_URL
98
-
</td>
99
-
</tr>
100
-
<tr>
101
-
<td style="text-align: right">
102
-
<strong>DEV</strong>
103
-
</td>
104
-
<td>
105
-
BASE_URL
106
-
</td>
107
-
<td rowspan="2">
108
-
https://myapi.app
109
-
</td>
110
-
<td rowspan="2">
111
-
The address of the Sails instance.
112
-
</td>
113
-
</tr>
114
-
<tr>
115
-
<td style="text-align: right">
116
-
<strong>PROD</strong>
117
-
</td>
118
-
<td>
119
-
BASE_URL
120
-
</td>
121
-
</tr>
122
-
<tr>
123
-
<td style="text-align: right">
124
-
<strong>DEV</strong>
125
-
</td>
126
-
<td>
127
-
DB_HOST
128
-
</td>
129
-
<td rowspan="2">
130
-
localhost
131
-
</td>
132
-
<td rowspan="2">
133
-
The hostname of the datastore.
134
-
</td>
135
-
</tr>
136
-
<tr>
137
-
<td style="text-align: right">
138
-
<strong>PROD</strong>
139
-
</td>
140
-
<td>
141
-
DB_HOSTNAME
142
-
</td>
143
-
</tr>
144
-
<tr>
145
-
<td style="text-align: right">
146
-
<strong>DEV</strong>
147
-
</td>
148
-
<td>
149
-
DB_USER
150
-
</td>
151
-
<td>
152
-
root
153
-
</td>
154
-
<td rowspan="2">
155
-
Username for the datastore.
156
-
</td>
157
-
</tr>
158
-
<tr>
159
-
<td style="text-align: right">
160
-
<strong>PROD</strong>
161
-
</td>
162
-
<td>
163
-
DB_USERNAME
164
-
</td>
165
-
<td>
166
-
produser
167
-
</td>
168
-
</tr>
169
-
<tr>
170
-
<td style="text-align: right">
171
-
<strong>DEV</strong>
172
-
</td>
173
-
<td>
174
-
DB_PASS
175
-
</td>
176
-
<td>
177
-
root
178
-
</td>
179
-
<td rowspan="2">
180
-
Password for the datastore.
181
-
</td>
182
-
</tr>
183
-
<tr>
184
-
<td style="text-align: right">
185
-
<strong>PROD</strong>
186
-
</td>
187
-
<td>
188
-
DB_PASSWORD
189
-
</td>
190
-
<td>
191
-
produser
192
-
</td>
193
-
</tr>
194
-
<tr>
195
-
<td style="text-align: right">
196
-
<strong>DEV</strong>
197
-
</td>
198
-
<td>
199
-
DB_NAME
200
-
</td>
201
-
<td>
202
-
myapp
203
-
</td>
204
-
<td rowspan="2">
205
-
The name of the database inside the datastore.
206
-
</td>
207
-
</tr>
208
-
<tr>
209
-
<td style="text-align: right">
210
-
<strong>PROD</strong>
211
-
</td>
212
-
<td>
213
-
DB_NAME
214
-
</td>
215
-
<td>
216
-
proddatabase
217
-
</td>
218
-
</tr>
219
-
<tr>
220
-
<td style="text-align: right">
221
-
<strong>DEV</strong>
222
-
</td>
223
-
<td>
224
-
DB_PORT
225
-
</td>
226
-
<td rowspan="2">
227
-
3306
228
-
</td>
229
-
<td rowspan="2">
230
-
The port number for the datastore.
231
-
</td>
232
-
</tr>
233
-
<tr>
234
-
<td style="text-align: right">
235
-
<strong>PROD</strong>
236
-
</td>
237
-
<td>
238
-
DB_PORT
239
-
</td>
240
-
</tr>
241
-
<tr>
242
-
<td style="text-align: right">
243
-
<strong>DEV</strong>
244
-
</td>
245
-
<td>
246
-
DB_SSL
247
-
</td>
248
-
<td rowspan="2">
249
-
true
250
-
</td>
251
-
<td rowspan="2">
252
-
If the datastore requires SSL, set this to "true".
253
-
</td>
254
-
</tr>
255
-
<tr>
256
-
<td style="text-align: right">
257
-
<strong>PROD</strong>
258
-
</td>
259
-
<td>
260
-
DB_SSL
261
-
</td>
262
-
</tr>
263
-
<tr>
264
-
<td style="text-align: right">
265
-
<strong>DEV</strong>
266
-
</td>
267
-
<td>
268
-
SESSION_SECRET
269
-
</td>
270
-
<td rowspan="2">
271
-
"" (empty string)
272
-
</td>
273
-
<td rowspan="2">
274
-
This is used to sign cookies, and SHOULD be set, especially on PRODUCTION environments.
275
-
</td>
276
-
</tr>
277
-
<tr>
278
-
<td style="text-align: right">
279
-
<strong>PROD</strong>
280
-
</td>
281
-
<td>
282
-
SESSION_SECRET
283
-
</td>
284
-
</tr>
285
-
<tr>
286
-
<td style="text-align: right">
287
-
<strong>DEV</strong>
288
-
</td>
289
-
<td>
290
-
DATA_ENCRYPTION_KEY
291
-
</td>
292
-
<td rowspan="2">
293
-
"" (empty string)
294
-
</td>
295
-
<td rowspan="2">
296
-
<strong>Currently unused; intended for future use.</strong>
297
-
</td>
298
-
</tr>
299
-
<tr>
300
-
<td style="text-align: right">
301
-
<strong>PROD</strong>
302
-
</td>
303
-
<td>
304
-
DATA_ENCRYPTION_KEY
305
-
</td>
306
-
</tr>
307
-
</tbody>
308
-
</table>
71
+
| DEV Variable | DEV Default | PROD Variable | PROD Default | Description |
| ASSETS_URL | "" (empty string) |**ASSETS_URL**|**"" (empty string)**| Webpack is configured to modify static asset URLs to point to a CDN, like CloudFront. MUST end with a slash " / ", or be empty. |
74
+
| BASE_URL |https://myapi.app|**BASE_URL**|**https://myapi.app**| The address of the Sails instance. |
75
+
| DB_HOST | localhost |**DB_HOSTNAME**|**localhost**| The hostname of the datastore. |
76
+
| DB_USER | root |**DB_USERNAME**|**produser**| Username of the datastore. |
77
+
| DB_PASS | root |**DB_PASSWORD**|**produser**| Password of the datastore. |
78
+
| DB_NAME | myapp |**DB_NAME**|**myapp**| The name of the database inside the datastore. |
79
+
| DB_PORT | 3306 |**DB_PORT**|**3306**| The port number for the datastore. |
80
+
| DB_SSL | true |**DB_SSL**|**true**| If the datastore requires SSL, set this to "true". |
81
+
| SESSION_SECRET | "" (empty string) |**SESSION_SECRET**|**"" (empty string)**| This is used to sign cookies, and SHOULD be set, especially on PRODUCTION environments. |
Automatic incoming request logging, is a 2 part process. First, the [`request-logger` hook](api/hooks/request-logger.js) gathers info from the request, and creates a new [`RequestLog` record](api/models/RequestLog.js), making sure to mask anything that may be sensitive, such as passwords. Then, a custom response gathers information from the response, again, scrubbing sensitive data (using the [customToJSON](https://sailsjs.com/documentation/concepts/models-and-orm/model-settings?identity=#customtojson) feature of Sails models) to prevent leaking of password hashes, or anything else that should never be publicly accessible. The [`keepModelsSafe` helper](api/helpers/keep-models-safe.js) and the custom responses (such as [ok](api/responses/ok.js) or [serverError](api/responses/serverError.js)) are responsible for the final leg of request logs.
0 commit comments