File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff 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
169174function 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}
You can’t perform that action at this time.
0 commit comments