File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -5,18 +5,13 @@ import { logger } from 'hono/logger';
55const app = new Hono ( ) ;
66
77app . use ( '*' , logger ( ) ) ;
8- app . use ( '*' , async ( c , next ) => {
9- c . res . headers . delete ( 'x-powered-by' ) ;
10- await next ( ) ;
11- } ) ;
128
139app . get ( '/' , ( c ) => {
1410 return c . json ( { message : 'Hello, world!' } ) ;
1511} ) ;
1612
1713app . get ( '/get' , ( c ) => {
1814 const value = c . req . query ( 'value' ) ;
19- console . log ( value ) ;
2015 if ( value === 'echo' ) throw new HTTPException ( 400 , { message : "Cannot echo 'echo'!" } ) ;
2116 return c . json ( { value } ) ;
2217} ) ;
@@ -57,7 +52,6 @@ app.post('/content/length', async (c) => {
5752 const buffer = await c . req . arrayBuffer ( ) ;
5853 return c . json ( {
5954 headerLength : contentLength ,
60- // See bodyparser middleware options above.
6155 serverBufferLength : buffer . byteLength
6256 } ) ;
6357} ) ;
You can’t perform that action at this time.
0 commit comments