Skip to content

Commit

Permalink
Merge branch 'release/4.0.16'
Browse files Browse the repository at this point in the history
  • Loading branch information
thetutlage committed Aug 29, 2017
2 parents 116fa0f + 84c2cda commit ab7b6bc
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 6 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
@@ -1,3 +1,13 @@
<a name="4.0.16"></a>
## [4.0.16](https://github.com/adonisjs/adonis-framework/compare/v4.0.15...v4.0.16) (2017-08-29)


### Bug Fixes

* **req,res:** reference `app.appKey` over `.secret` ([ef22649](https://github.com/adonisjs/adonis-framework/commit/ef22649))



<a name="4.0.15"></a>
## [4.0.15](https://github.com/adonisjs/adonis-framework/compare/v4.0.14...v4.0.15) (2017-08-25)

Expand Down
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "@adonisjs/framework",
"version": "4.0.15",
"version": "4.0.16",
"description": "Adonis framework makes it easy for you to write webapps with less code",
"main": "index.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion src/Request/index.js
Expand Up @@ -33,7 +33,7 @@ const Macroable = require('macroable')

const SUBDOMAIN_OFFSET = 'app.http.subdomainOffset'
const TRUST_PROXY = 'app.http.trustProxy'
const SECRET = 'app.secret'
const SECRET = 'app.appKey'

/**
* A facade over Node.js HTTP `req` object, making it
Expand Down
2 changes: 1 addition & 1 deletion src/Response/index.js
Expand Up @@ -17,7 +17,7 @@ const parseurl = require('parseurl')

const RouteManager = require('../Route/Manager')

const SECRET = 'app.secret'
const SECRET = 'app.appKey'
const JSONPCALLBACK = 'app.http.jsonpCallback'

/**
Expand Down
2 changes: 1 addition & 1 deletion test/unit/request.spec.js
Expand Up @@ -23,7 +23,7 @@ const SECRET = 'averylongsecretkey'
* for testing.
*/
const config = new Config()
config.set('app.secret', SECRET)
config.set('app.appKey', SECRET)
config.set('app.http.subdomainOffset', 2)
config.set('app.http.allowMethodSpoofing', true)

Expand Down
4 changes: 2 additions & 2 deletions test/unit/response.spec.js
Expand Up @@ -262,7 +262,7 @@ test.group('Response', (group) => {
test('encrypt cookie when secret is defined', async (assert) => {
const server = http.createServer((req, res) => {
const config = new Config()
config.set('app.secret', SECRET)
config.set('app.appKey', SECRET)
const response = new Response(req, res, config)
response.cookie('cart_total', '20')
response.send('')
Expand All @@ -287,7 +287,7 @@ test.group('Response', (group) => {
test('send plain cookie even if secret is defined', async (assert) => {
const server = http.createServer((req, res) => {
const config = new Config()
config.set('app.secret', SECRET)
config.set('app.appKey', SECRET)
const response = new Response(req, res, config)
response.plainCookie('cart_total', '20')
response.send('')
Expand Down

0 comments on commit ab7b6bc

Please sign in to comment.