Skip to content

Commit d00512e

Browse files
authored
Switch to using the Vary: X-Inertia header (#404)
1 parent a232be0 commit d00512e

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/Middleware.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,7 @@ public function handle(Request $request, Closure $next)
8686
Inertia::setRootView($this->rootView($request));
8787

8888
$response = $next($request);
89-
90-
$response->header('Vary', 'Accept');
89+
$response->headers->set('Vary', 'X-Inertia');
9190

9291
if (! $request->header('X-Inertia')) {
9392
return $response;

0 commit comments

Comments
 (0)