[3.x] Allow history encryption to be unsupported in non-SSL environments#2982
Open
jlswanson28694 wants to merge 2 commits intoinertiajs:3.xfrom
Open
[3.x] Allow history encryption to be unsupported in non-SSL environments#2982jlswanson28694 wants to merge 2 commits intoinertiajs:3.xfrom
jlswanson28694 wants to merge 2 commits intoinertiajs:3.xfrom
Conversation
e4cf7f8 to
c8e73d4
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
I'm using the
EncryptHistorymiddleware on my Laravel backend, but my dev environment isn't using SSL. Unfortunately, Inertia throws an error under these conditions, and I am unable to use my app.Proposed Solution
Check if encryption is supported at the encryption entrypoint
encryptHistoryfunction, and log the warning once to let users know history encryption is not supported without SSL, but then continue without encrypting instead of throwing an error.An alternative solution would be adjusting the server-side adapters to allow for a global history encryption kill switch (one that also turns off the Laravel middleware for example), but the approach I took here made the most sense to me.
This PR also updates a few parameter types to increase type safety.