fix(config): add missing config/app.js file
This commit is contained in:
parent
936fd65ff3
commit
d7ab369650
159
config/app.js
Normal file
159
config/app.js
Normal file
|
@ -0,0 +1,159 @@
|
|||
'use strict'
|
||||
|
||||
const Env = use('Env')
|
||||
|
||||
module.exports = {
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| App Key
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| App key is a randomly generated 16 or 32 characters long string required
|
||||
| to encrypted cookies, sessions and other sensitive data.
|
||||
|
|
||||
*/
|
||||
appKey: Env.get('APP_KEY'),
|
||||
|
||||
http: {
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Allow Method Spoofing
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Method spoofing allows to make requests by spoofing the http verb.
|
||||
| Which means you can make a GET request but instruct the server to
|
||||
| treat as a POST or PUT request. If you want this feature, set the
|
||||
| below value to true.
|
||||
|
|
||||
*/
|
||||
allowMethodSpoofing: true,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Trust Proxy
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Trust proxy defines whether X-Forwaded-* headers should be trusted or not.
|
||||
| When your application is behind a proxy server like nginx, these values
|
||||
| are set automatically and should be trusted. Apart from setting it
|
||||
| to true or false Adonis supports handful or ways to allow proxy
|
||||
| values. Read documentation for that.
|
||||
|
|
||||
*/
|
||||
trustProxy: false,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Subdomains
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Offset to be used for returning subdomains for a given request.For
|
||||
| majority of applications it will be 2, until you have nested
|
||||
| sudomains.
|
||||
| cheatsheet.adonisjs.com - offset - 2
|
||||
| virk.cheatsheet.adonisjs.com - offset - 3
|
||||
|
|
||||
*/
|
||||
subdomainOffset: 2,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| JSONP Callback
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Default jsonp callback to be used when callback query string is missing
|
||||
| in request url.
|
||||
|
|
||||
*/
|
||||
jsonpCallback: 'callback'
|
||||
},
|
||||
|
||||
views: {
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Cache Views
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Define whether or not to cache the compiled view. Set it to true in
|
||||
| production to optimize view loading time.
|
||||
|
|
||||
*/
|
||||
cache: Env.get('CACHE_VIEWS', true)
|
||||
},
|
||||
|
||||
static: {
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Dot Files
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Define how to treat dot files when trying to server static resources.
|
||||
| By default it is set to ignore, which will pretend that dotfiles
|
||||
| does not exists.
|
||||
|
|
||||
| Can be one of the following
|
||||
| ignore, deny, allow
|
||||
|
|
||||
*/
|
||||
dotfiles: 'ignore',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| ETag
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Enable or disable etag generation
|
||||
|
|
||||
*/
|
||||
etag: true,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Extensions
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Set file extension fallbacks. When set, if a file is not found, the given
|
||||
| extensions will be added to the file name and search for. The first
|
||||
| that exists will be served. Example: ['html', 'htm'].
|
||||
|
|
||||
*/
|
||||
extensions: false
|
||||
},
|
||||
|
||||
locales: {
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Driver
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The driver to be used for fetching and updating locales. Below is the
|
||||
| list of available options.
|
||||
|
|
||||
| file, database
|
||||
|
|
||||
*/
|
||||
driver: 'file',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Default Locale
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Default locale to be used by Antl provider. You can always switch drivers
|
||||
| in runtime or use the official Antl middleware to detect the driver
|
||||
| based on HTTP headers/query string.
|
||||
|
|
||||
*/
|
||||
locale: 'en',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Fallback Locale
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Fallback locale to be used when actual locale is not supported.
|
||||
|
|
||||
*/
|
||||
fallbackLocale: 'en'
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user