Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

TTL infinity not usable #4

Open
pekeler opened this issue Oct 5, 2016 · 2 comments
Open

TTL infinity not usable #4

pekeler opened this issue Oct 5, 2016 · 2 comments

Comments

@pekeler
Copy link

pekeler commented Oct 5, 2016

The code sets the TTL to Infinity if timeToLive is falsy. But, the manifest declares a default value of 1 week making it impossible to actually use Infinity as TTL.

if (!cfg.timeToLive) {
"default": 604800000

@pekeler
Copy link
Author

pekeler commented Oct 5, 2016

Setting timeToLive to 0 produces a session cookie which doesn't seem to be the intent according to the documentation.

@pekeler
Copy link
Author

pekeler commented Oct 5, 2016

I think the problem might actually be in Foxx BaseMiddleware. This line
https://github.com/arangodb/arangodb/blob/d9d6588151a4da8557c0d01a72430de37e8e1bf6/js/server/modules/%40arangodb/foxx/legacy/base_middleware.js#L133

should be more like:

var ttl = (typeof cfg.ttl === 'number') ? Math.min(cfg.ttl, 20*365*24*60*60) : undefined;

i.e. infinite becomes 20 years.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant