@@ -8,17 +8,17 @@ export class Server {
8
8
9
9
public registerRoutes ( ) : void {
10
10
// We currently don't handle Web Key Directory Update Protocol, so empty string is fine.
11
- this . fastify . get ( "/policy" , ( ) => "" ) ;
11
+ this . fastify . get ( "/.well-known/openpgpkey/ policy" , ( ) => "" ) ;
12
12
13
- this . fastify . head ( "/hu/:wkdHash" , ( req , res ) => {
13
+ this . fastify . head ( "/.well-known/openpgpkey/ hu/:wkdHash" , ( req , res ) => {
14
14
const { wkdHash } = req . params as { wkdHash : string } ;
15
15
16
16
if ( ! this . wkd . has ( wkdHash ) ) return res . status ( 404 ) . send ( ) ;
17
17
18
18
return res . status ( 200 ) . send ( ) ;
19
19
} ) ;
20
20
21
- this . fastify . get ( "/hu/:wkdHash" , ( req , res ) => {
21
+ this . fastify . get ( "/.well-known/openpgpkey/ hu/:wkdHash" , ( req , res ) => {
22
22
const { wkdHash } = req . params as { wkdHash : string } ;
23
23
24
24
if ( ! this . wkd . has ( wkdHash ) ) return res . status ( 404 ) . send ( ) ;
@@ -32,7 +32,7 @@ export class Server {
32
32
. send ( pubKeys . combineBinary ( ) ) ;
33
33
} ) ;
34
34
35
- this . fastify . post ( "/internal/updateHook" , ( req , res ) => updateHook ( req , res , this . wkd ) ) ;
35
+ this . fastify . post ( "/.well-known/openpgpkey/ internal/updateHook" , ( req , res ) => updateHook ( req , res , this . wkd ) ) ;
36
36
}
37
37
38
38
public async start ( port : number , host = "0.0.0.0" ) : Promise < any > {
0 commit comments