File tree Expand file tree Collapse file tree 1 file changed +10
-8
lines changed
src/Efficiently/JqueryLaravel Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -37,15 +37,17 @@ public function __construct()
37
37
public function handle ($ request , Closure $ next )
38
38
{
39
39
$ response = $ next ($ request );
40
- if (! $ this ->shouldPassThrough ($ request ) ||
41
- ($ this ->isReading ($ request ) && $ this ->nonXhrJavascriptResponse ($ request , $ response ))
42
- ) {
43
- $ crossOriginJavascriptWarning = "Security warning: an embedded " .
44
- "<script> tag on another site requested protected JavaScript. " .
45
- "If you know what you're doing, go ahead and disable CSRF " .
46
- "protection on this action to permit cross-origin JavaScript embedding. " ;
40
+ if (! $ this ->shouldPassThrough ($ request )) {
41
+ if ($ this ->isReading ($ request ) &&
42
+ $ this ->nonXhrJavascriptResponse ($ request , $ response )
43
+ ) {
44
+ $ crossOriginJavascriptWarning = "Security warning: an embedded " .
45
+ "<script> tag on another site requested protected JavaScript. " .
46
+ "If you know what you're doing, go ahead and disable CSRF " .
47
+ "protection on this action to permit cross-origin JavaScript embedding. " ;
47
48
48
- throw new CrossOriginRequestException ($ crossOriginJavascriptWarning );
49
+ throw new CrossOriginRequestException ($ crossOriginJavascriptWarning );
50
+ }
49
51
}
50
52
51
53
return $ response ;
You can’t perform that action at this time.
0 commit comments