Skip to content

Commit 630486e

Browse files
committed
fix windows "Forbidden" regression
1 parent 3803cdd commit 630486e

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "gerbil",
33
"productName": "Gerbil",
4-
"version": "1.18.2",
4+
"version": "1.18.3",
55
"description": "Run Large Language Models locally",
66
"main": "out/main/index.js",
77
"homepage": "./",
@@ -58,7 +58,7 @@
5858
"rehype-raw": "^7.0.0",
5959
"rehype-sanitize": "^6.0.0",
6060
"remark-gfm": "^4.0.1",
61-
"systeminformation": "^5.28.6",
61+
"systeminformation": "^5.28.7",
6262
"winston": "^3.19.0",
6363
"winston-daily-rotate-file": "^5.0.0",
6464
"yauzl": "^3.2.0",

src/main/modules/static-server.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { createServer, Server } from 'http';
22
import { readFile } from 'fs/promises';
3-
import { join, normalize, resolve as resolvePath } from 'path';
3+
import { join, normalize, resolve as resolvePath, sep } from 'path';
44
import { lookup } from 'mime-types';
55
import { pathExists } from '@/utils/node/fs';
66

@@ -17,7 +17,7 @@ export const startStaticServer = (distPath: string) =>
1717
const resolvedDistPath = resolvePath(distPath);
1818

1919
if (
20-
!normalizedPath.startsWith(resolvedDistPath + '/') &&
20+
!normalizedPath.startsWith(resolvedDistPath + sep) &&
2121
normalizedPath !== resolvedDistPath
2222
) {
2323
res.writeHead(403);

yarn.lock

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4165,7 +4165,7 @@ __metadata:
41654165
rehype-sanitize: "npm:^6.0.0"
41664166
remark-gfm: "npm:^4.0.1"
41674167
rollup-plugin-visualizer: "npm:^6.0.5"
4168-
systeminformation: "npm:^5.28.6"
4168+
systeminformation: "npm:^5.28.7"
41694169
typescript: "npm:^5.9.3"
41704170
vite: "npm:^7.3.0"
41714171
winston: "npm:^3.19.0"
@@ -7839,12 +7839,12 @@ __metadata:
78397839
languageName: node
78407840
linkType: hard
78417841

7842-
"systeminformation@npm:^5.28.6":
7843-
version: 5.28.6
7844-
resolution: "systeminformation@npm:5.28.6"
7842+
"systeminformation@npm:^5.28.7":
7843+
version: 5.28.7
7844+
resolution: "systeminformation@npm:5.28.7"
78457845
bin:
78467846
systeminformation: lib/cli.js
7847-
checksum: 10c0/375c9ada7e437bd29f9b9e341eb43af1853ba2ac51d43a504352e32cb93f181d34b6a8729ef05cb4bb6d6bbe54eaa454494a05c0b6fd3a580943adcb67ce9d3a
7847+
checksum: 10c0/dbf7fd3f893ad84032399e4c81147715933f80e3b11bc0c2c59a14948be488404a0de49407253bcc1b9fae6ef2b8c25a9798ed4424158c70730a44e4b138aa71
78487848
conditions: (os=darwin | os=linux | os=win32 | os=freebsd | os=openbsd | os=netbsd | os=sunos | os=android)
78497849
languageName: node
78507850
linkType: hard

0 commit comments

Comments
 (0)