I see you are using Wordpress, I'm not used to it but probably you have to create/use a plugin to match the endpoint with the json. Something like this:

```

function nostr_nip_05_endpoint() {

register_rest_route('nostr-nip-05/v1', '/.well-known/nostr.json', array(

'methods' => 'GET',

'callback' => 'nostr_nip_05_json',

));

}

add_action('rest_api_init', 'nostr_nip_05_endpoint');

function nostr_nip_05_json($request) {

$json_data = '{

"names": {

"_": "5cad82c898ee66013711945d687f7d9549f645a0118467dae2f5e274c598d6ff"

},

"relays": {

"5cad82c898ee66013711945d687f7d9549f645a0118467dae2f5e274c598d6ff": [

"wss://relay.damus.io",

"wss://nos.lol",

"wss://nostr.orangepill.dev"

]

}

}';

$data = json_decode($json_data, true);

return rest_ensure_response($data);

}

```

Reply to this note

Please Login to reply.

Discussion

No replies yet.