bordalix on Nostr: If your web app is accessing a endpoint which not signals CORS you need to deploy a ...
If your web app is accessing a endpoint which not signals CORS you need to deploy a cors everywhere proxy: your web app connects to this proxy, that will fetch from the original endpoint and respond to your web app with the CORS headers on, thus fixing the problem.
You can deploy such a proxy in Cloudflare workers (the free tier should be enough) using this code:
https://github.com/Zibri/cloudflare-cors-anywherePublished at
2024-12-21 08:37:53Event JSON
{
"id": "a86d47af2ba8ee0b6384b67a5a4ba4305b51dabcca2bd25d1d937afc50dada7a",
"pubkey": "62cef883863022a4f1d60d54857c9d729650702c9fe227b0988c0b6e36c4bcce",
"created_at": 1734770273,
"kind": 1,
"tags": [
[
"p",
"1bc70a0148b3f316da33fe3c89f23e3e71ac4ff998027ec712b905cd24f6a411"
],
[
"e",
"6e6779497197e6c4700333b1275db043c1163f43d0dea44f68e81e0a083640af",
"",
"root"
]
],
"content": "If your web app is accessing a endpoint which not signals CORS you need to deploy a cors everywhere proxy: your web app connects to this proxy, that will fetch from the original endpoint and respond to your web app with the CORS headers on, thus fixing the problem.\n\nYou can deploy such a proxy in Cloudflare workers (the free tier should be enough) using this code:\n\nhttps://github.com/Zibri/cloudflare-cors-anywhere",
"sig": "e35a2c5ef61a9b24806d52745a213d48909ef52287bc650a6f6e55b8c04726b6e6d479466cf303233eb2c8b98d410ce3db637448375fc070304e966fedab94fb"
}