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

When the code block contains too much content, the highlight request server directly issues 431 Request Header Fields Too Large #303

Open
it-fb opened this issue Dec 6, 2024 · 1 comment

Comments

@it-fb
Copy link

it-fb commented Dec 6, 2024

Some of my code blocks are over 300 lines long. Highlight rendering always fails when entering the page for the first time. Only after refreshing can it render normally.

Image
Image

When I increase the header limit in nginx it seems to have some effect.
But my program is multilingual. It can be highlighted normally only in Chinese and English modes, but in Japanese mode some code blocks are still in 413 status and cannot be rendered. It can only be highlighted normally when refreshing.
Image

So I'm thinking about using Post instead of Get
rehype-nuxt.ts

return await $fetch("/api/_mdc/highlight", {
        params: {
          code,
          lang,
          theme: JSON.stringify(theme),
          options: JSON.stringify(options)
        },
      });
@716774
Copy link

716774 commented Dec 19, 2024

me too

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

No branches or pull requests

2 participants