Please explain to a nostr-noob

Reply to this note

Please Login to reply.

Discussion

your server that hosts the NIP-05 needs to include this header in the response:

access-control-allow-origin: *

Thanks, but I have no idea what this means. ๐Ÿซค

how are you hosting your NIP-05?

On my web-hotel

can you control the HTTP response headers?

I cat find any settings for that.

is this some kind of free hosting site?

No I pay for hosting https://websupport.se/

you could switch to Vercel. it's free and no CORS error

i will check with my web host support.

does it support PHP?

Yes i think so

can you try this?

header("Access-Control-Allow-Origin: *");

?>

Where shall i put it?

couldn't tell you, I don't work with PHP myself

thanks for the satoshis ๐Ÿซ‚

No thank you! for your time and effort ๐Ÿ˜ƒ

I got a responce from my web-host

They recommended that i shall put

Header set Access-Control-Allow-Origin "*"

in .htaccess in the root folder of my web page.

I have now done that but I cant verify if it is working.

But im not shure if i just shold pu this text in the file if i need to format it to be readable correctly.

Nevermind, i got it to work ;) Wooohooo..

Thanks for all your help!

I had placed the .htaccess file in the worong place ๐Ÿ˜‰

I still see the CORS error

I guess something is wrong with noStrudel, because I see your json is fetching properly and has the correct Access-Control-Allow-Origin header

Thats funny, This morning I got the check mark on my profile. And everything looked good. I havent changed anything since and now its gone? "poof"

Yes very funny. I got the check mark this this morning and now its gone. I havenยดt changed anything since then. Maybe it will come back again ๐Ÿ˜„

header("Access-Control-Allow-Origin: *")

echo file_get_contents("nip05.json")

Nice catch, that explains why I see a lot of profiles with the "!" next to them in NoStrudel. Never paid attention before, good to know!

CORS errors everywhere. it's only an issue in web clients