Skip to content

Commit f15301d

Browse files
Preserve X-Xsrf-Token header from .htaccess (#6520)
* Preserve X-Xsrf-Token header from .htaccess Preserve X-Xsrf-Token header for session based authentication when building API in Laravel * Update .htaccess * Update .htaccess --------- Co-authored-by: Taylor Otwell <taylor@laravel.com>
1 parent d4e9385 commit f15301d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

public/.htaccess

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@
99
RewriteCond %{HTTP:Authorization} .
1010
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
1111

12+
# Handle X-XSRF-Token Header
13+
RewriteCond %{HTTP:x-xsrf-token} .
14+
RewriteRule .* - [E=HTTP_X_XSRF_TOKEN:%{HTTP:X-XSRF-Token}]
15+
1216
# Redirect Trailing Slashes If Not A Folder...
1317
RewriteCond %{REQUEST_FILENAME} !-d
1418
RewriteCond %{REQUEST_URI} (.+)/$

0 commit comments

Comments
 (0)