---
title: "Discussion on \"CORS和在Spring Framework裡的應用\" | Hashnode"
description: "Discussion on \"CORS和在Spring Framework裡的應用\". Intro\nCross-Origin Resource Sharing (CORS)\nMDN\nSpec\n為了防止XSS Attack，也就是惡意的JS讓使用者發請求到第三方網站，瀏覽器會限制XHR Request只能發到同一個origin。CORS Header讓伺服器端可以設定允許的origin。\nSpecifications\nSimple Request & Preflight Request\nSimple Request: GET, HEAD, POST with Origin Heade..."
url: "https://hashnode.com/posts/corsspring-framework/62ecdf7fe3a3793580dfc9f4"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [CORS和在Spring Framework裡的應用](https://ebifurai.hashnode.dev/corsspring-framework?utm_source=hashnode&utm_medium=feed)

Intro Cross-Origin Resource Sharing (CORS) MDN Spec 為了防止XSS Attack，也就是惡意的JS讓使用者發請求到第三方網站，瀏覽器會限制XHR Request只能發到同一個origin。CORS Header讓伺服器端可以設定允許的origin。 Specifications Simple Request & Preflight Request Simple Request: GET, HEAD, POST with Origin Heade...

Aug 5, 2022 · 2 min read · ebifurai.hashnode.dev  
Updated Aug 23, 2022  
Read the article

-   [#spring](https://hashnode.com/tag/spring)
-   [#springboot](https://hashnode.com/tag/springboot)
-   [#web-development](https://hashnode.com/tag/web-development)

## Written by

[蕭從恩](https://hashnode.com/@ebifurai)

@ebifurai · Tokyo, Japan

  
[View profile](https://hashnode.com/@ebifurai)

Backend developer in Java, sometimes Kotlin.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
