Giter Club home page Giter Club logo

Comments (9)

andrewnaeve avatar andrewnaeve commented on August 15, 2024

I am also calling request.yar.set('hi', {key: 'hello'}) and getting undefined calling request.yar.get('hi') on the next request. Hapi v 16.1.0.

from yar.

Marsup avatar Marsup commented on August 15, 2024

Can you both check that the cookie is actually set in the browser ?

from yar.

DyncKevin avatar DyncKevin commented on August 15, 2024

@Marsup thank you very much, it is the cookie setting problem.

from yar.

DyncKevin avatar DyncKevin commented on August 15, 2024

another question, if my configure above is using catbox-redis or redis, after yar.set, why can't i get the value by redis-client. when I enter redis cmd like "keys userId" or "get userId", I got nothing.

from yar.

Marsup avatar Marsup commented on August 15, 2024

catbox has absolutely nothing to do with yar.

from yar.

DyncKevin avatar DyncKevin commented on August 15, 2024

the meaning of this sentence “If the content is too big to fit, it uses server storage via the hapi plugin cache interface.” is that only when the data size is over cookie size, the server storage will be used.
what I should do is config the server like this:
server: {
port: envKey('port'),
routes: {
cors: true
},
router: {
stripTrailingSlash: true
},
cache: [
{
name: 'redisCache',
engine: require('catbox-redis'),
host: '127.0.0.1',
partition: 'cache',
password: '123456'
}
]
}

Am I right ?

from yar.

DyncKevin avatar DyncKevin commented on August 15, 2024

hi , it seems that chrome do not allow get and send cookie, i am using vue+axios to handle http. i have google a lot, but not find a solution, do you know how to solve it?

from yar.

hueniverse avatar hueniverse commented on August 15, 2024

Please open a new issue instead of reopening this one. Also, better to ask the last question in hapijs/discuss.

from yar.

lock avatar lock commented on August 15, 2024

This thread has been automatically locked due to inactivity. Please open a new issue for related bugs or questions following the new issue template instructions.

from yar.

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.