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.
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.