---
title: "Discussion on \"跨域請求如何攜帶 Cookie\" | Hashnode"
description: "Discussion on \"跨域請求如何攜帶 Cookie\". 在前端請求的時候設置 request 對象屬性 withCredentials 為 true\n\n什麼是 withCredentials?\n\nwithCredentials 是 XMLHttpRequest 中的一個 Boolean 類型，\n\n只是是否使用 cookies, authorized header（頭"
url: "https://hashnode.com/posts/cookie/643aabb4b4339fb0a9f219f1"
---

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

Discussion

# [跨域請求如何攜帶 Cookie](https://emmaswy.hashnode.dev/cookie?utm_source=hashnode&utm_medium=feed)

在前端請求的時候設置 request 對象屬性 withCredentials 為 true 什麼是 withCredentials? withCredentials 是 XMLHttpRequest 中的一個 Boolean 類型， 只是是否使用 cookies, authorized header（頭

Apr 15, 2023 · 1 min read · emmaswy.hashnode.dev  
Read the article

-   [#https](https://hashnode.com/tag/https)
-   [#cookies](https://hashnode.com/tag/cookies)

## Written by

[Emma Shih](https://hashnode.com/@emma163)

@emma163 · Taiwan, Taipei

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

Technical sharing from a FE Developer

ESTJ 前端工程師｜曾經任職乘車服務、電商和區塊鏈公司，走過新加坡，現座標台北｜有一隻很二哈的賓士貓｜樂於探索知識擁抱新工具｜同時也是 Hip Hop 人偶爾跳跳 jazz

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
