Comments (9)
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.
Can you both check that the cookie is actually set in the browser ?
from yar.
@Marsup thank you very much, it is the cookie setting problem.
from yar.
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.
catbox has absolutely nothing to do with yar.
from yar.
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.
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.
Please open a new issue instead of reopening this one. Also, better to ask the last question in hapijs/discuss.
from yar.
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)
- no 'domain' cookie options in documentation HOT 2
- Can't register plugin - UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'register' of undefined HOT 2
- Using hapi's server.decorate could be dangerous. HOT 2
- Falsy values are converted to null HOT 2
- Delete a specific user's session HOT 5
- Yar doesn't handle the session cookie multiple times correctly. HOT 3
- Minor: Deprecated use of uuid HOT 1
- Session in distributed environment HOT 2
- Change module namespace HOT 1
- Support nes HOT 2
- Action required: Greenkeeper could not be activated 🚨 HOT 1
- Update dep HOT 1
- Only node 12
- Require hapi 19
- Change plugin name to @hapi/yar
- Assign data in onPreResponse lifecycle extension with takeover HOT 5
- Use built-in crypto.randomUUID HOT 2
- Drop support for node v12
- Password rotation
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from yar.