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

Fixup syntax highlighting #90

Merged
merged 5 commits into from
Oct 7, 2024
Merged

Fixup syntax highlighting #90

merged 5 commits into from
Oct 7, 2024

Conversation

zephraph
Copy link
Owner

@zephraph zephraph commented Oct 7, 2024

I started some re-work when I looked at my KV this morning and realized it was full of a bunch of junk HTML. After some digging, it turns out it was actually cloudflare's bot detection getting triggered and rendering a challenge. I had bot detection enabled and I think I was triggering it on my own endpoint... awkward.

I also noticed I was seeing some unknown lang messages spit out in one of my posts (and cached in KV). I went again and added the explicit logic for language checking so that I could pre-empt a lot of the transformations before the request happened.

Lastly I removed the pre removal logic from the html rewriter b/c it was striping out the pre tags on code blocks without a lang specified which is worse than having two nested pre tags.

I added a salt for the content hash so I could effectively "bust" the KV cache at any time.

This is all a bit of a mess. I'd like to figure out a better way to do it.

Copy link

cloudflare-workers-and-pages bot commented Oct 7, 2024

Deploying just-be-dev with  Cloudflare Pages  Cloudflare Pages

Latest commit: ade7fd9
Status: ✅  Deploy successful!
Preview URL: https://ee29a1fa.just-be-dev.pages.dev
Branch Preview URL: https://downgrade-to-val-url.just-be-dev.pages.dev

View logs

@zephraph zephraph changed the title Use val.town URL instead of my custom redirect Fixup syntax highlighting Oct 7, 2024
@zephraph zephraph force-pushed the downgrade-to-val-url branch from 2e489f0 to b16b44c Compare October 7, 2024 17:53
@zephraph zephraph merged commit 18d2398 into main Oct 7, 2024
2 checks passed
@zephraph zephraph deleted the downgrade-to-val-url branch October 7, 2024 18:20
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