shuding / nextra

Simple, powerful and flexible site generation framework with everything you love from Next.js.

Home Page:https://nextra.site

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Search Function Issue When Using Reverse Proxy in Vercel for Nextra Project

SunJia1394 opened this issue · comments

After configuring a reverse proxy using vercel.json for my Nextra project with the following route setup:

{
"routes": [
{
"src": "/docs",
"dest": "nextra_url"
},
{
"src": "^/docs/(.*)",
"dest": "nextra_url/$1"
}
]
}
When attempting to search on the proxied page, it shows "Failed to load search index" whereas the search works correctly on the destination page.

Steps to Reproduce:
Configure the reverse proxy using vercel.json as described above.
Visit the proxied /docs page in the Nextra project.
Try performing a search on the proxied page.
Expected Behavior:
The search functionality on the proxied /docs page should function properly without displaying any errors.

Actual Behavior:
When searching on the proxied /docs page, the message "Failed to load search index" is displayed, indicating a malfunction in the search functionality specific to the proxied setup.

Additional Information:
The issue arises after setting up the reverse proxy via vercel.json.
Search functionality functions correctly on the destination page.
Any insights or suggestions to resolve this search functionality issue with the Vercel proxy configuration would be highly appreciated.
Environment:
Nextra project version:2.13.4

Thank you for any assistance or recommendations that can help address the search functionality concern in my Nextra project within the Vercel environment.