v15.3.0: Redirection and SpecHelper Updates

3 views
Skip to first unread message

Evan Tahler

unread,
Nov 4, 2016, 2:35:33 PM11/4/16
to actionHero.js
https://github.com/evantahler/actionhero/releases/tag/v15.3.0

Maintain path when redirecting web client whose host did not match host

  • If a web client's Host header/request does not match those found in api.config.servers.web.allowedRequestHosts, we will noe maintain the path of the request when redirecting
  • via @evantahler via #977

Response type saftey for action errors and spec helper

  • If your action returns a string or array, and there is an error, we should return the error as a string, and not attempt to return response.error = error, as this creates an improper javascript object. This may be a breaking change if you relied on this improper behavior
  • This extends to the specHelper, whose response types should follow this same pattern. Actions with string responses will remain as string or array responses will have errors returned as strings.
  • via @evantahler via #979

Enable/disable spechelper metadata

  • In your tests, if you do not want the specHelper actions to include metadata (data.response.serverInformationdata.response.requesterInformation, and data.response.messageCount) from the server, you can configure api.specHelper.returnMetadata = false in your tests.
  • via @evantahler via #980
Reply all
Reply to author
Forward
0 new messages