File tree Expand file tree Collapse file tree 1 file changed +10
-10
lines changed Expand file tree Collapse file tree 1 file changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,16 @@ public function handle(Request $request, Closure $next)
28
28
return $ response ;
29
29
}
30
30
31
+ foreach (config ('analytics.exclude ' , []) as $ except ) {
32
+ if ($ except !== '/ ' ) {
33
+ $ except = trim ($ except , '/ ' );
34
+ }
35
+
36
+ if ($ request ->fullUrlIs ($ except ) || $ request ->is ($ except )) {
37
+ return $ response ;
38
+ }
39
+ }
40
+
31
41
$ agent = new Agent ();
32
42
if ($ userAgent = $ request ->headers ->get ('user-agent ' )) {
33
43
$ agent ->setUserAgent ($ userAgent );
@@ -49,16 +59,6 @@ public function handle(Request $request, Closure $next)
49
59
}
50
60
}
51
61
52
- foreach (config ('analytics.exclude ' , []) as $ except ) {
53
- if ($ except !== '/ ' ) {
54
- $ except = trim ($ except , '/ ' );
55
- }
56
-
57
- if ($ request ->fullUrlIs ($ except ) || $ request ->is ($ except )) {
58
- return $ response ;
59
- }
60
- }
61
-
62
62
$ attributes = [
63
63
'session ' => $ this ->getSessionProvider ()->get ($ request ),
64
64
'uri ' => $ uri ,
You can’t perform that action at this time.
0 commit comments