Skip to content

Commit e1a2b0a

Browse files
Rewind the body before reading it (#150)
* Rewind the body before reading it * Update CHANGELOG.md
1 parent fd5a631 commit e1a2b0a

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@
44
* Removed the update generator and reduced options for install generator [PR 149](https://github.com/shakacode/cypress-on-rails/pull/149)
55

66
### Fixed
7-
* fix update index.js in install generatpr [PR 147](https://github.com/shakacode/cypress-on-rails/pull/147) by [Judahmeek]
7+
* fix update index.js in install generator [PR 147](https://github.com/shakacode/cypress-on-rails/pull/147) by [Judahmeek]
88
* Support rails 7.1 by adding content-type header to generated on-rails.js file [PR 148](https://github.com/shakacode/cypress-on-rails/pull/148) by [anark]
9+
* Rewind body before reading it [PR 150](https://github.com/shakacode/cypress-on-rails/pull/150)
910

1011
## [1.16.0]
1112
[Compare]: https://github.com/shakacode/cypress-on-rails/compare/v1.15.1...v1.16.0

lib/cypress_on_rails/middleware.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ def handle_command(req)
5151
# Halt the middleware if an Rack Env was returned by `before_request`
5252
return maybe_env unless maybe_env.nil?
5353

54+
req.body.rewind
5455
body = JSON.parse(req.body.read)
5556
logger.info "handle_command: #{body}"
5657
commands = Command.from_body(body, configuration)

0 commit comments

Comments
 (0)