mirror of
https://github.com/alrayyes/wiki.git
synced 2024-11-22 19:46:23 +00:00
fix: content-disposition inline should apply to all resource types (closes #728)
This commit is contained in:
parent
85f05ea99b
commit
b014d060f3
2 changed files with 2 additions and 2 deletions
|
@ -347,7 +347,7 @@ export async function handleBuild(argv) {
|
||||||
directoryListing: false,
|
directoryListing: false,
|
||||||
headers: [
|
headers: [
|
||||||
{
|
{
|
||||||
source: "**/*.html",
|
source: "**/*.*",
|
||||||
headers: [{ key: "Content-Disposition", value: "inline" }],
|
headers: [{ key: "Content-Disposition", value: "inline" }],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
|
|
@ -52,7 +52,7 @@ function sluggify(s: string): string {
|
||||||
.split("/")
|
.split("/")
|
||||||
.map((segment) =>
|
.map((segment) =>
|
||||||
segment.replace(/\s/g, "-").replace(/%/g, "-percent").replace(/\?/g, "-q").replace(/#/g, ""),
|
segment.replace(/\s/g, "-").replace(/%/g, "-percent").replace(/\?/g, "-q").replace(/#/g, ""),
|
||||||
) // slugify all segments
|
)
|
||||||
.join("/") // always use / as sep
|
.join("/") // always use / as sep
|
||||||
.replace(/\/$/, "")
|
.replace(/\/$/, "")
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue