Git Product home page Git Product logo

Comments (5)

OvidijusParsiunas avatar OvidijusParsiunas commented on August 11, 2024 2

Hey @wysstartgo.
Just to make sure I understand the problem correctly, is the cookie not being attached when you are using the stream mode with stream property set to true or if it just doesn't work for regular requests?

The thing with cookies is - is that by default the browser appends them to the outgoing fetch requests as long as the target server is on the same origin as the browser (share the same url) by setting the credentials property to same-origin. If the server is not on the same origin or the browser is not automatically appending this property, the cookie will not be sent.

The current version of Deep Chat does not have a manual way to set this. Hence I created a quick patch for the deep-chat-dev package version 9.0.64 where you can configure it. (This package behaves just like the normal one except it's a different name)

Now you should be able to set your config with credentials: 'same-origin':

:request="{
  url: 'http://localhost:8080/chat-stream-flowable',
  method: 'POST',
  credentials: 'same-origin',
  headers: { charset: 'utf-8' },
  additionalBodyProps: { field: 'value' }
}"

or try credentials: 'include':

:request="{
  url: 'http://localhost:8080/chat-stream-flowable',
  method: 'POST',
  credentials: 'include',
  headers: { charset: 'utf-8' },
  additionalBodyProps: { field: 'value' }
}"

Let me know if this helps.

from deep-chat.

OvidijusParsiunas avatar OvidijusParsiunas commented on August 11, 2024 1

It is 3:00AM in the morning where I live, so I am going to bed and will be able to respond tomorrow afternoon. Thanks!

from deep-chat.

wysstartgo avatar wysstartgo commented on August 11, 2024 1

okay,thanks for you answer,it has been sloved by add credentials: 'include'

from deep-chat.

OvidijusParsiunas avatar OvidijusParsiunas commented on August 11, 2024 1

Good to hear. I will be releasing a new version of Deep Chat sometime this week and will include this feature in the new release. I will close this issue when this is done.
Thanks!

from deep-chat.

OvidijusParsiunas avatar OvidijusParsiunas commented on August 11, 2024

Hi. The functionality discussed above has now been released in Deep Chat version 1.4.4. Please read the release notes for more information.

I will be closing this issue, but if you experience any problems relating to credentials feel free to comment below or raise a new issue for anything else. Thanks!

from deep-chat.

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.