• doughless@lemmy.world
      link
      fedilink
      English
      arrow-up
      1
      ·
      29 days ago

      Those examples are perfectly secure if you set the allowed origins to only your domains, or domains you specifically want to allow use of your API.

      If someone copied those examples verbatim, they’d end up allowing a website hosted at example.com to call their API. Which I suppose is technically not secure, but I wouldn’t call it very insecure unless example.com was taken over by a malicious user.