Code Monkey home page Code Monkey logo

Comments (8)

big-camel avatar big-camel commented on May 20, 2024

headers: {cookie: 'xxxxx' }

from am-editor.

hedeqiang avatar hedeqiang commented on May 20, 2024

@yanmao-cc 这个不允许设置cookie
Refused to set unsafe header "cookie"

from am-editor.

big-camel avatar big-camel commented on May 20, 2024

https://www.w3.org/TR/XMLHttpRequest/#the-setrequestheader%28%29-method
都试试看
https://indomi.github.io/2019/03/05/%E8%B7%A8%E5%9F%9Fcookie%E6%90%BA%E5%B8%A6%E5%AE%9E%E8%B7%B5/

"Cookie": document.cookie

from am-editor.

hedeqiang avatar hedeqiang commented on May 20, 2024

貌似不行

from am-editor.

big-camel avatar big-camel commented on May 20, 2024

貌似不行

是跨域cookie吧?跨域可以设置一些类似 Authoritarian 这样的请求头会好一点,要么就做个反向代理

from am-editor.

hedeqiang avatar hedeqiang commented on May 20, 2024

不是,我们的上传服务器需要进行登陆,而登陆依赖于cookie,所以就不行,之前使用 element 上传,他提供了 with-credentials 参数,设置允许发送 cookie,所以没有问题

from am-editor.

big-camel avatar big-camel commented on May 20, 2024

看代码这个选项没有开放出来,下一个版本解决吧

from am-editor.

hedeqiang avatar hedeqiang commented on May 20, 2024

OK,预计下个版本的时间点是什么时候

from am-editor.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.