Skip to content

[3.x] Allow history encryption to be unsupported in non-SSL environments#2982

Open
jlswanson28694 wants to merge 2 commits intoinertiajs:3.xfrom
jlswanson28694:encryption-warning
Open

[3.x] Allow history encryption to be unsupported in non-SSL environments#2982
jlswanson28694 wants to merge 2 commits intoinertiajs:3.xfrom
jlswanson28694:encryption-warning

Conversation

@jlswanson28694
Copy link
Copy Markdown

Problem

I'm using the EncryptHistory middleware 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 encryptHistory function, 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.

@jlswanson28694 jlswanson28694 marked this pull request as draft March 26, 2026 02:19
@jlswanson28694 jlswanson28694 changed the base branch from 2.x to 3.x March 26, 2026 03:55
@jlswanson28694 jlswanson28694 changed the title Allow history encryption to be unsupported in non-SSL environments [3.x] Allow history encryption to be unsupported in non-SSL environments Mar 26, 2026
@jlswanson28694 jlswanson28694 marked this pull request as ready for review March 26, 2026 04:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant