RangerMauve / dat-pub

Lightweight HTTP service for discovering dats
MIT License
9 stars 0 forks source link

Remove details prop or restrict it #4

Closed aaronshaf closed 6 years ago

aaronshaf commented 6 years ago

It seems like the details prop in the POST body could be a recipe for trouble. Someone could flood the archive with very large payloads. Can I remove this for now until it is well-defined with some restrictions?

RangerMauve commented 6 years ago

I'm all for it! I wasn't totally sure what to put in there anyways. :D

RangerMauve commented 6 years ago

What do you think about replacing it with a Date.now() timestamp?

aaronshaf commented 6 years ago

Replacing the {}? Can you be more specific? Perhaps:

{
  "lastUpdated": Date.now
}

?

RangerMauve commented 6 years ago

I was originally thinking just the timestamp, but having lastUpdated in an object would be better in case there's more useful information that could be put there in the future.