Siguria & Cloud

CORS

Në shqip përdoret i njëjti emër.

ShpjegimiSQ

CORS-i janë rregullat që vendosin nëse një faqe në një domen mund të marrë të dhëna nga një domen tjetër. Nëse serveri s'e lejon, shfletuesi e bllokon kërkesën dhe sheh gabimin e famshëm „CORS error“ në konsolë.

EnglishEN

CORS is the set of rules that decides whether a page on one domain may fetch data from another domain. If the server doesn't allow it, the browser blocks the request and you see the famous “CORS error” in the console.

Si ta mendosh

Si roja i shkollës që i lë vetëm prindërit e listës t'i marrin fëmijët: nëse emri yt s'është në listë, s'merr dot askënd, edhe me qëllim të mirë.

Lexoje në anglisht

Like the school guard who lets only listed parents pick up children: if your name isn't on the list, you can't take anyone, even with good intentions.

Shembull kodijavascript

// Serveri (Node.js) lejon vetëm faqen tonë:
res.setHeader("Access-Control-Allow-Origin", "https://fjalori.dev");

Terma të lidhur