File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed
Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change 3737 nokogiri (>= 1.5.9 )
3838 method_source (1.0.0 )
3939 minitest (5.14.4 )
40+ nokogiri (1.12.3-arm64-darwin )
41+ racc (~> 1.4 )
4042 nokogiri (1.12.3-x86_64-darwin )
4143 racc (~> 1.4 )
4244 nokogiri (1.12.3-x86_64-linux )
6365 zeitwerk (2.4.2 )
6466
6567PLATFORMS
68+ arm64-darwin-21
6669 x86_64-darwin-18
6770 x86_64-linux
6871
Original file line number Diff line number Diff line change @@ -133,7 +133,8 @@ class FetchRequest {
133133 if ( response . unauthenticated && response . authenticationURL ) {
134134 return Promise . reject ( window . location . href = response . authenticationURL ) ;
135135 }
136- if ( response . ok && response . isTurboStream ) {
136+ const responseStatusIsTurboStreamable = response . ok || response . unprocessableEntity ;
137+ if ( responseStatusIsTurboStreamable && response . isTurboStream ) {
137138 await response . renderTurboStream ( ) ;
138139 }
139140 return response ;
@@ -159,7 +160,7 @@ class FetchRequest {
159160 headers : this . headers ,
160161 body : this . formattedBody ,
161162 signal : this . signal ,
162- credentials : "same-origin" ,
163+ credentials : this . credentials ,
163164 redirect : this . redirect
164165 } ;
165166 }
@@ -232,6 +233,9 @@ class FetchRequest {
232233 get redirect ( ) {
233234 return this . options . redirect || "follow" ;
234235 }
236+ get credentials ( ) {
237+ return this . options . credentials || "same-origin" ;
238+ }
235239 get additionalHeaders ( ) {
236240 return this . options . headers || { } ;
237241 }
You can’t perform that action at this time.
0 commit comments