Skip to content

Commit

Permalink
fix csrf token again
Browse files Browse the repository at this point in the history
  • Loading branch information
girardinsamuel committed Oct 29, 2021
1 parent 5867def commit 20dc7f6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/masonite/inertia/middleware/InertiaMiddleware.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def after(self, request, response):
# in a X-XSRF-TOKEN header in the subsequent request
# It's important that, the cookie has not HttpOnly and Secure as discussed
# here: https://stackoverflow.com/a/54132068/15131933
request.cookie("XSRF-TOKEN", request.cookie("csrf_token"), secure=False, http_only=False)
response.cookie("XSRF-TOKEN", request.cookie("csrf_token"), secure=False, http_only=False)
return response

def is_inertia_request(self, request):
Expand Down

0 comments on commit 20dc7f6

Please sign in to comment.