Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: pass origin checking anyway in v0.13 #1411

Merged
merged 4 commits into from
Feb 26, 2025
Merged

Conversation

Myriad-Dreamin
Copy link
Owner

@Myriad-Dreamin Myriad-Dreamin commented Feb 26, 2025

Make origin checking soft for a while for people using tools like typst-preview.nvim. They use a client that doesn't set Origin correctly. The check was introduced in #1157. Note: if you use a trusted and verified browser, the scripts inside still cannot bypass the origin checking.

Example to eliminate the error in log (typst-preview.nvim)

The clients using websocat can set the origin to http://localhost.

7d453375174d646c992338dd43d6312a

CC @tmistele @chomosuke. Related issue:

@Myriad-Dreamin Myriad-Dreamin changed the title fix: pass origin checking anyway fix: pass origin checking anyway in v0.13 Feb 26, 2025
@Myriad-Dreamin Myriad-Dreamin marked this pull request as ready for review February 26, 2025 17:16
@Myriad-Dreamin Myriad-Dreamin merged commit 8fcd045 into main Feb 26, 2025
18 checks passed
@tmistele
Copy link
Contributor

Agree that should be fine. Normal browsers always send an Origin header when it is important. The same behavior I had also implemented in #1382 , though I didn't mention it in the PR description, I should probably mention it there.

@Myriad-Dreamin Myriad-Dreamin deleted the origin-check3 branch February 27, 2025 02:25
chomosuke pushed a commit to chomosuke/typst-preview.nvim that referenced this pull request Feb 28, 2025
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.

2 participants