Skip to content

Commit 5787d8b

Browse files
committed
Try this.
1 parent 630a14c commit 5787d8b

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

handleRequest.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@ export async function handleRequest(request: Request) {
1818
if (atSignIndex >= 0 && url.pathname.length - atSignIndex === 65) {
1919
return redirectWithoutHash(url, atSignIndex);
2020
}
21+
if (url.pathname.includes("testing-this-out")) {
22+
return new Response(Deno.env.get("DPRINT_PLUGINS_GH_TOKEN")?.substring(0, 5) ?? "fail", {
23+
status: 200,
24+
});
25+
}
2126
const newUrl = await resolvePluginOrSchemaUrl(url);
2227
if (newUrl != null) {
2328
const contentType = newUrl.endsWith(".json")
@@ -167,6 +172,6 @@ function create404Response() {
167172
}
168173

169174
function redirectWithoutHash(url: URL, atSignIndex: number) {
170-
const newUrl = new URL(url.pathname.slice(0, atSignIndex) + url.search + url.hash, url);
175+
const newUrl = new URL(url.pathname.slice(0, atSignIndex), url);
171176
return createRedirectResponse(newUrl.toString());
172177
}

0 commit comments

Comments
 (0)