mirror of
https://github.com/Rain-kl/OpenFlare.git
synced 2026-10-01 14:46:36 +08:00
修复 Pages 站点在未启用 SPA Fallback 时访问根路径 / 返回 404:OpenResty 渲染增加 location = / 精确匹配,通过 try_files 提供入口文件(index 指令在 try_files ... =404 场景下不会作用于根路径)。
This commit is contained in:
@@ -29,7 +29,6 @@ export function ProxyRouteDetailPageClient() {
|
||||
const [route, setRoute] = useState<ProxyRouteItem | null>(null);
|
||||
const [loading, setLoading] = useState(true);
|
||||
const [loadError, setLoadError] = useState<string | null>(null);
|
||||
const [sectionSaving, setSectionSaving] = useState(false);
|
||||
|
||||
const handleSectionChange = useCallback(
|
||||
(section: ProxyRouteConfigSection) => {
|
||||
@@ -113,7 +112,6 @@ export function ProxyRouteDetailPageClient() {
|
||||
const sectionProps = {
|
||||
route,
|
||||
onRouteUpdate: handleRouteUpdate,
|
||||
onSavingChange: setSectionSaving,
|
||||
};
|
||||
|
||||
return (
|
||||
@@ -150,7 +148,7 @@ export function ProxyRouteDetailPageClient() {
|
||||
<CacheSection {...sectionProps} />
|
||||
</TabsContent>
|
||||
<TabsContent value="waf" className="focus-visible:outline-none">
|
||||
<WafSection route={route} onSavingChange={setSectionSaving} />
|
||||
<WafSection route={route} />
|
||||
</TabsContent>
|
||||
<TabsContent value="auth" className="focus-visible:outline-none">
|
||||
<AuthSection {...sectionProps} />
|
||||
|
||||
Reference in New Issue
Block a user