Zum Hauptinhalt springen
tsecurity.de LIVE
Echtzeit-Radar & Feeds
Alle RSS Feeds
👥 Community & Social
Sichere ProgrammierungI audited my own ML linter and had to withdraw its best evidence(21.09.2026 um 22:54 Uhr)
Sichere ProgrammierungQuantum Result Validation for Distributed Computing Systems(21.09.2026 um 22:54 Uhr)
Sichere ProgrammierungJWT Authentication and Role-Based Access Control in LocalHands(21.09.2026 um 22:56 Uhr)
Sichere ProgrammierungStochastic Parrot or Alien Mind?(21.09.2026 um 22:56 Uhr)
Sichere ProgrammierungBuilding AI for the Physical World Is a Different Engineering Problem(21.09.2026 um 22:58 Uhr)
Sichere ProgrammierungI audited my own ML linter and had to withdraw its best evidence(21.09.2026 um 22:54 Uhr)
Sichere ProgrammierungQuantum Result Validation for Distributed Computing Systems(21.09.2026 um 22:54 Uhr)
Sichere ProgrammierungJWT Authentication and Role-Based Access Control in LocalHands(21.09.2026 um 22:56 Uhr)
Sichere ProgrammierungStochastic Parrot or Alien Mind?(21.09.2026 um 22:56 Uhr)
Sichere ProgrammierungBuilding AI for the Physical World Is a Different Engineering Problem(21.09.2026 um 22:58 Uhr)
Intelligence View
⚡ tsecurity.de Intelligence

Understanding CORS Preflight Requests

In the previous article, we introduced the HTTP OPTIONS method and learned that it is commonly used to discover the capabilities of a resource. Now it's time to understand why browsers sometimes send an OPTIONS request before the actual…

0
↗ Quelle (dev.to)
Reagiere als Erste:r — dein Feedback zählt!

In the previous article, we introduced the HTTP OPTIONS method and learned that it is commonly used to discover the capabilities of a resource.



Now it's time to understand why browsers sometimes send an OPTIONS request before the actual request.



This process is called a Preflight Request.



Isn't CORS Enough?



As we've already learned, CORS is a browser security mechanism.



If the server does not allow the requesting Origin, the browser prevents JavaScript from accessing the response.



However, this raises an important question.



What if the request itself could perform a sensitive operation on the server?



For example, imagine a Cross-Origin request using the DELETE or PUT method.



If the browser always sent the request first and only blocked the response afterward, the server might already have deleted or modified data before the browser enforced CORS.



To address this problem, browsers perform a Preflight Request for certain Cross-Origin requests.



How Does a Preflight Request Work?



Before sending the actual request, the browser first sends an OPTIONS request to the same endpoint.



The browser is essentially asking:




"Am I allowed to send the upcoming request with these characteristics?"




If the server responds with the appropriate CORS headers, the browser proceeds with the actual request.



Otherwise, the actual request is never sent.



Example



Suppose the application intends to send:




DELETE /users/15 HTTP/1.1
Origin: https://app.example.com






Instead of sending it immediately, the browser first sends:




OPTIONS /users/15 HTTP/1.1
Origin: https://app.example.com
Access-Control-Request-Method: DELETE






This informs the server that a DELETE request is about to be made.



If the server approves it, the browser sends the actual request.



Server Response



A typical response might look like:




HTTP/1.1 204 No Content
Access-Control-Allow-Origin: https://app.example.com
Access-Control-Allow-Methods: DELETE






Once the browser receives this response, it knows that sending the actual request is permitted.



When Is a Preflight Request Sent?



Browsers do not send a Preflight Request for every Cross-Origin request.



Preflight is only required when the request is not a Simple Request.



We'll define what qualifies as a Simple Request in the next article.



CORS vs. Preflight



Although they're closely related, they serve different purposes.





  • CORS determines whether JavaScript is allowed to access the response.


  • Preflight determines whether the browser is allowed to send the actual request in the first place.



In other words, Preflight happens before the request, while CORS enforcement primarily affects access to the response.



In the next article, we'll explore what makes a request "simple" and why only certain requests require a Preflight check.

Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten Understanding CORS Preflight Requests

Thematisch verwandte Begriffe: Understanding, CORS, Preflight, Requests · 6 Treffer

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Zum Aktualisieren ziehen
ZERO-DAY CVE-2026-79918 | MaxKB is an open-source AI assistant for enterprise. Prior to version 2.…
Advisory →
TTS Reader • tsecurity.de Voice
tsecurity.de Icon
tsecurity.de App
Offline-Lesen, Eilmeldungen & 0ms Ladezeit

Installiere tsecurity.de direkt auf deinen Home-Bildschirm für das ultimative Vollbild-Magazinerlebnis ohne Browser-Leisten.

Nächster Beitrag
Themen-Radar & Intelligence Matrix
Echtzeit-Taxonomie nach Angriffsvektoren & Plattformen

tsecurity.de Live Threat Radar

🔴 LIVE RADAR
MONITORING
AKTIV
CVE-DATENBANK
LIVE
🔍
Community Radar & Live Chat
Sentinel Bot online • Live-Stream
Dein Cluster: Security Explorer
Match:
lädt…
Verbindung zum Community-Stream wird aufgebaut...
Bearbeitungsmodus — Senden überschreibt deine Nachricht
Community-Puls — was gerade passiert
lädt…
Aktivitäten deiner Analysten
lädt…
Neues Thema oder Eilmeldung einreichen

Reiche interessante Links, Zero-Days oder Debatten ein. Die Community entscheidet per Upvote über die Veröffentlichung.

Heiß diskutierte Einreichungen
🔖 Gespeicherte Artikel
📂 Keine gespeicherten Artikel vorhanden.
Zurück Ziehen Vor
Links: vorheriger Artikel Rechts: nächster Artikel unten: schließen
News NIS-2 Frühwarnung Tier-1 Intel ⏱️ 3 Min vor 10 Min
Artikeldaten werden geladen...

Zurück: vorheriger Vor: nächster
↗ Original-Quelle
Social Reaktionen Deine Reaktion zählt
Einstufung & Relevanz-Poll 0 Stimmen
In sozialen Netzwerken teilen 1-Klick