-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Vercel has a Chinese path problem #4408
Comments
Hmm, can you try clearing your browser and dns cache? (Ctrl + Shift + R on page; for dns cache go to It might be a temporary issue though. If you're using some VPN maybe try restarting it? Can you check what happens if you run |
我重置了DNS和VPN,但是问题仍然出现,每次刷新时页面的错误ID也在变化。 I reset the DNS and VPN, but the problem still occurs and the error ID of the page changes with each refresh. |
StatusCode : 200
StatusDescription : OK
Content : <!DOCTYPE html>
<html lang="en-US" dir="ltr">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>中文 | BlazeSnow - VitepressIssue</ti...
RawContent : HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
Age: 1127
Content-Disposition: inline; filename="ä¸æ.html"
Strict-Transport-Security: max-age=63072000; includeSubDomains; preload
X-Vercel-Cache...
Forms : {}
Headers : {[Access-Control-Allow-Origin, *], [Age, 1127], [Content-Disposition, inline; filename="ä¸æ.html
"], [Strict-Transport-Security, max-age=63072000; includeSubDomains; preload]...}
Images : {}
InputFields : {}
Links : {@{innerHTML=Skip to content ; innerText=Skip to content ; outerHTML=<A class="VPSkipLink visually-
hidden" href="#VPContent" data-v-c8291ffa>Skip to content </A>; outerText=Skip to content ; tagName
=A; class=VPSkipLink visually-hidden; href=#VPContent; data-v-c8291ffa=}, @{innerHTML=<!--[--><!--]
--><!----><SPAN data-v-9f43907a>BlazeSnow - VitepressIssue</SPAN><!--[--><!--]-->; innerText=BlazeS
now - VitepressIssue; outerHTML=<A class=title href="/" data-v-9f43907a><!--[--><!--]--><!----><SPA
N data-v-9f43907a>BlazeSnow - VitepressIssue</SPAN><!--[--><!--]--></A>; outerText=BlazeSnow - Vite
pressIssue; tagName=A; class=title; href=/; data-v-9f43907a=}, @{innerHTML=<!--[--><SPAN data-v-815
115f5>Home</SPAN><!--]-->; innerText=Home; outerHTML=<A tabIndex=0 class="VPLink link VPNavBarMenuL
ink" href="/" data-v-afb2845e data-v-815115f5><!--[--><SPAN data-v-815115f5>Home</SPAN><!--]--></A>
; outerText=Home; tagName=A; tabIndex=0; class=VPLink link VPNavBarMenuLink; href=/; data-v-afb2845
e=; data-v-815115f5=}, @{innerHTML=<!--[--><SPAN data-v-7eeeb2dc>test</SPAN><!--]-->; innerText=tes
t; outerHTML=<A class="VPLink link" href="/test/" data-v-7eeeb2dc><!--[--><SPAN data-v-7eeeb2dc>tes
t</SPAN><!--]--></A>; outerText=test; tagName=A; class=VPLink link; href=/test/; data-v-7eeeb2dc=}.
..}
ParsedHtml : mshtml.HTMLDocumentClass
RawContentLength : 12993 |
好像Vercel最近进行了更新,我看不到任何日志,包括代码为200的页面。 It seems that Vercel has been updated recently and I can't see any logs, including the page with code 200. |
我发现问题出现在进入网站的方式。作为网站的所有者,我是从vercel的部署界面点击链接进入网页,此时网页的路径有中文时,会出现404和500的报错;但是我删去Cookies,直接输入链接进入网页时,就不会出现以上问题。经过多次删去Cookies后不同进入网页的方式的测试,问题更可能出现在vercel的toolbar而不是vitepress。 I found that the problem was the way to access the site. As the owner of the website, I clicked the link to enter the page from the deployment interface of vercel. At this time, when the path of the page has Chinese, there will be 404 and 500 errors; However, when I delete the Cookies and enter the link directly to the web page, the above problem does not occur. After several tests of different ways of accessing web pages after deleting Cookies, the problem is more likely to occur in the toolbar of vercel than in vitepress. |
Was this fixed? Maybe try contacting vercel support. VitePress itself doesn't create or register any middleware, it just generates pure HTML/CSS/JS. |
Describe the bug
使用
vercel.com
,当网页的路径中存在中文时,如:/cnpath/中文.html
,网页会先报错404
,刷新后报错500
,显示MIDDLEWARE_INVOCATION_FAILED
。Using
vercel.com
, when a Chinese character exists in the path of a webpage, such as/cnpath/中文.html
, the webpage will first return an error of404
, then refresh and return an error of500
with the messageMIDDLEWARE_INVOCATION_FAILED
.Reproduction
https://blazesnow-vitepressissue.vercel.app/
https://github.com/BlazeSnow/VitepressIssue
Expected behavior
使用vercel.com,当网页的路径中存在中文时,不应报错404或500,而是像GitHub pages或Cloudflare pages一样正常显示。
With vercel.com, when there is Chinese in the path of a web page, it should not report an error of 404 or 500, but display normally like GitHub pages or Cloudflare pages.
System Info
Additional context
No response
Validations
The text was updated successfully, but these errors were encountered: