未验证 提交 b54614f0 编写于 作者: C Connor Davis 提交者: GitHub

Exclude well known files when trailing slash: true

上级 7782ba6f
......@@ -388,13 +388,13 @@ export default async function loadCustomRoutes(
if (config.trailingSlash) {
redirects.unshift(
{
source: '/:file((?:[^/]+/)*[^/]+\\.\\w+)/',
source: '/:file((?!\\.well-known(?:/.*)?)(?:[^/]+/)*[^/]+\\.\\w+)/',
destination: '/:file',
permanent: true,
locale: config.i18n ? false : undefined,
},
{
source: '/:notfile((?:[^/]+/)*[^/\\.]+)',
source: '/:notfile((?!\\.well-known(?:/.*)?)(?:[^/]+/)*[^/\\.]+)',
destination: '/:notfile/',
permanent: true,
locale: config.i18n ? false : undefined,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册