File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -333,6 +333,16 @@ export class Http1Server implements Printable {
333333 } ) ;
334334 }
335335
336+ // The /up endpoint is used by Kamal.
337+ public enableKamalPing ( path = '/up' , response : string | Uint8Array = 'yes' ) {
338+ this . route ( {
339+ path,
340+ handler : ( ctx ) => {
341+ ctx . res . end ( response ) ;
342+ } ,
343+ } ) ;
344+ }
345+
336346 // ---------------------------------------------------------------- Printable
337347
338348 public toString ( tab = '' ) : string {
Original file line number Diff line number Diff line change @@ -72,7 +72,9 @@ export class RpcServer implements Printable {
7272 }
7373
7474 public enableHttpPing ( ) : void {
75- this . http1 . enableHttpPing ( ) ;
75+ const http1 = this . http1 ;
76+ http1 . enableHttpPing ( ) ;
77+ http1 . enableKamalPing ( ) ;
7678 }
7779
7880 public enableCors ( ) : void {
You can’t perform that action at this time.
0 commit comments