Skip to content

"Burn after reading" pastes can be reloaded in browser #1262

Closed Answered by asherber
asherber asked this question in Q&A
Discussion options

You must be logged in to vote

Yes, that looks right. When I visit the URL of a burn-on-read paste, the initial call to ?<id> returns with cache control no-store, no-cache, no-transform, must-revalidate. It looks like this is set in Controller.php, in the _view method.

But on my site, the subsequent ajax call to ?pasteid=<id> returns with max-age=172800 and I suppose the browser is caching that. (On privatebin.net, the ajax call returns with no cache-control header.)

Shouldn't the __construct method set the same cache control headers as _view, so that JSON responses don't get cached? I just added it there in my copy, and now burn-on-read pastes behave as expected.

Replies: 3 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by elrido
Comment options

You must be logged in to vote
3 replies
@elrido
Comment options

@asherber
Comment options

@rugk
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
3 participants