umijs / umi-request

A request tool based on fetch.
2.2k stars 336 forks source link

umi-request 在做拦截器的时候为请求 headers 中统一增加 Cookie 字段未成功? #246

Open glk-hll opened 3 years ago

glk-hll commented 3 years ago

umi-request 在做拦截器的时候为请求 headers 中统一增加 Cookie 字段不能成功, 将 Cookie 字段修改为其他字段都是可行的,是怎么回事?

headers 增加的字段为: image

请求 header 头为: image

bestofyour commented 3 years ago

what?

progerchai commented 3 years ago

umi-request 在做拦截器的时候为请求 headers 中统一增加 Cookie 字段不能成功, 将 Cookie 字段修改为其他字段都是可行的,是怎么回事?

headers 增加的字段为: image

请求 header 头为: image

你这个可能需要修改一下credentials 为include,默认omit 会忽略cookie

但是我这边出现这么个情况,传的cookie 没问题,但是会不知道被谁强改成SWOFT_SESSION_ID 有大哥遇到过类似的问题吗,找不到在那里被修改了cookie image

givetimetolife commented 2 years ago

没用