Skip to content

Commit 1ee2ab0

Browse files
committed
style video
1 parent 1179182 commit 1ee2ab0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

v2/security/csrf-protection.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ The easiest way to implement this is using server-side middleware. Simply includ
6262

6363
When a CSRF token mismatch occurs, your server-side framework will likely throw an exception that results in an error response. For example, when using Laravel, a `TokenMismatchException` is thrown which results in a `419` error page. Since that isn't a valid Inertia response, the error is shown in a modal.
6464

65-
<video controls><source src="/mp4/csrf-mismatch-modal.mp4" type="video/mp4"></source></video>
65+
<video controls className="w-full rounded-xl" src="/mp4/csrf-mismatch-modal.mp4"></video>
6666

6767
Obviously, this isn't a great user experience. A better way to handle these errors is to return a redirect back to the previous page, along with a flash message that the page expired. This will result in a valid Inertia response with the flash message available as a prop which you can then display to the user. Of course, you'll need to share your [flash messages](/shared-data#flash-messages) with Inertia for this to work.
6868

@@ -86,4 +86,4 @@ use Symfony\Component\HttpFoundation\Response;
8686

8787
The end result is a much better experience for your users. Instead of seeing the error modal, the user is instead presented with a message that the page "expired" and are asked to try again.
8888

89-
<video controls><source src="/mp4/csrf-mismatch-warning.mp4" type="video/mp4"></source></video>
89+
<video controls className="w-full rounded-xl" src="/mp4/csrf-mismatch-warning.mp4"></video>

0 commit comments

Comments
 (0)