\n \n```\n(note: script-min.js have Popwola class)\n but it doesn't work if I add that script in a html file and double click to open it, it doesn't fetch and logs the error in the screenshot.\n\nWhat can I do if I want to allow access from any origin?","author":{"@type":"Person","name":"niaz"},"datePublished":"2023-06-08T17:39:58.352Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/LikeAction","userInteractionCount":0},"commentCount":17,"comment":[{"@type":"Comment","text":"Have you added your `something.vercel.app` as a web platform in the console?","author":{"@type":"Person","name":"Binyamin"},"datePublished":"2023-06-08T17:42:27.636Z","url":"https://appwrite.io/threads/1116421376870469852#message-1116422003012948070"},{"@type":"Comment","text":"https://appwrite.io/docs/getting-started-for-web#addPlatform","author":{"@type":"Person","name":"Binyamin"},"datePublished":"2023-06-08T17:43:28.256Z","url":"https://appwrite.io/threads/1116421376870469852#message-1116422257271656610"},{"@type":"Comment","text":"yes,, I've added this:","author":{"@type":"Person","name":"niaz"},"datePublished":"2023-06-08T17:45:43.932Z","url":"https://appwrite.io/threads/1116421376870469852#message-1116422826338041936"},{"@type":"Comment","text":"In your attached photo it seems like you're running it from a local html file?","author":{"@type":"Person","name":"Binyamin"},"datePublished":"2023-06-08T17:46:54.820Z","url":"https://appwrite.io/threads/1116421376870469852#message-1116423123663863828"},{"@type":"Comment","text":"?","author":{"@type":"Person","name":"Binyamin"},"datePublished":"2023-06-08T17:47:02.638Z","url":"https://appwrite.io/threads/1116421376870469852#message-1116423156454924319"},{"@type":"Comment","text":"yes, it is","author":{"@type":"Person","name":"niaz"},"datePublished":"2023-06-08T17:47:05.629Z","url":"https://appwrite.io/threads/1116421376870469852#message-1116423169000091668"},{"@type":"Comment","text":"Mmm, \nSo then no host can be send like that, and it will better to use some server to access this file thorugh a server.","author":{"@type":"Person","name":"Binyamin"},"datePublished":"2023-06-08T17:47:37.270Z","url":"https://appwrite.io/threads/1116421376870469852#message-1116423301712072775"},{"@type":"Comment","text":"it works perfectly if I run it on `loachost:port` ,,\nhave to check if it works in like github pages/netlify etc..\nlet me check","author":{"@type":"Person","name":"niaz"},"datePublished":"2023-06-08T17:49:17.272Z","url":"https://appwrite.io/threads/1116421376870469852#message-1116423721150853211"},{"@type":"Comment","text":"Yes, as `localhost:port` is a server and any request from localhost set as the host are okay.","author":{"@type":"Person","name":"Binyamin"},"datePublished":"2023-06-08T17:51:22.924Z","url":"https://appwrite.io/threads/1116421376870469852#message-1116424248173527101"},{"@type":"Comment","text":"And if you're uploading it to something like github pages/netlify - static host.\nThen make sure to add a web platform with your full static host domain.","author":{"@type":"Person","name":"Binyamin"},"datePublished":"2023-06-08T17:52:05.539Z","url":"https://appwrite.io/threads/1116421376870469852#message-1116424426913800202"},{"@type":"Comment","text":"ummm,, I checked,, it only works on *.vercel.app,,\nbut for my use case I want to allow from any origin,\nwhat can I do for that?","author":{"@type":"Person","name":"niaz"},"datePublished":"2023-06-08T17:59:05.921Z","url":"https://appwrite.io/threads/1116421376870469852#message-1116426190123696171"},{"@type":"Comment","text":"can I just add a `*` in my console for hostname?","author":{"@type":"Person","name":"niaz"},"datePublished":"2023-06-08T18:00:13.931Z","url":"https://appwrite.io/threads/1116421376870469852#message-1116426475378319431"},{"@type":"Comment","text":"Yes","author":{"@type":"Person","name":"Binyamin"},"datePublished":"2023-06-08T18:23:13.849Z","url":"https://appwrite.io/threads/1116421376870469852#message-1116432263173914756"},{"@type":"Comment","text":"It worked.\nThanks!","author":{"@type":"Person","name":"niaz"},"datePublished":"2023-06-08T18:26:40.423Z","url":"https://appwrite.io/threads/1116421376870469852#message-1116433129608060968"},{"@type":"Comment","text":"<:appwriteupvote:899677724615016528>","author":{"@type":"Person","name":"Binyamin"},"datePublished":"2023-06-08T18:26:45.892Z","url":"https://appwrite.io/threads/1116421376870469852#message-1116433152546709695"},{"@type":"Comment","text":"[Solved]: Problem with Access-Control-Allow-Origin","author":{"@type":"Person","name":"niaz"},"datePublished":"2023-06-08T18:26:52.911Z","url":"https://appwrite.io/threads/1116421376870469852#message-1116433181986537623"},{"@type":"Comment","text":"Hey @niaz you exposed your .env file why??\nhttps://github.com/NiazMorshed2007/popwola/blob/master/.env","author":{"@type":"Person","name":"Rishav"},"datePublished":"2023-06-09T07:09:58.142Z","url":"https://appwrite.io/threads/1116421376870469852#message-1116625219164049418"}]}}
Skip to content
Back
ResolvedWebCloud

[Solved]: Problem with Access-Control-Allow-Origin

Votes

0

Replies

17

Participants

Unknown

Messages

18

niazOriginal post

Rank 2: Process

Binyamin
niaz

Rank 2: Process

Binyamin
Binyamin
niaz

Rank 2: Process

Binyamin
niaz

Rank 2: Process

Binyamin
Binyamin
niaz

Rank 2: Process

niaz

Rank 2: Process

Binyamin
niaz

Rank 2: Process

Binyamin
niaz

Rank 2: Process

Join the discussion

Reply to this thread by joining our Discord.

Reply on Discord