Skip to content

Commit f278495

Browse files
committed
♻️ Decode URI before parsing
1 parent 1ea5b8b commit f278495

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

api/_lib/parser.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { ParsedRequest, Theme } from './types';
44

55
export function parseRequest(req: IncomingMessage) {
66
console.log('HTTP ' + req.url);
7-
const { pathname = '/', query = {} } = parse(req.url || '', true);
7+
const { pathname = '/', query = {} } = parse(req.url && decodeURIComponent(req.url) || '', true);
88
const { fontSize, images, widths, heights, theme, md } = query;
99

1010
if (Array.isArray(fontSize)) {

0 commit comments

Comments
 (0)