mirror of
https://github.com/Luzifer/past3.git
synced 2024-12-22 20:31:16 +00:00
Set cache-control to prevent browser caching
this prevents files being cached and not updated in the editor Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
ab3315ce3b
commit
c6f83318e7
1 changed files with 2 additions and 0 deletions
2
app.js
2
app.js
|
@ -1,5 +1,6 @@
|
||||||
const allUsersURI = 'http://acs.amazonaws.com/groups/global/AllUsers'
|
const allUsersURI = 'http://acs.amazonaws.com/groups/global/AllUsers'
|
||||||
const dateFormat = 'YYYY-MM-DD HH:mm:ss'
|
const dateFormat = 'YYYY-MM-DD HH:mm:ss'
|
||||||
|
const defaultCacheControl = 'no-cache'
|
||||||
|
|
||||||
// showAlert creates an alert message and displays it
|
// showAlert creates an alert message and displays it
|
||||||
function showAlert(type, msg, timeout = 0, actions = {}) {
|
function showAlert(type, msg, timeout = 0, actions = {}) {
|
||||||
|
@ -379,6 +380,7 @@ function saveFile(filename, content) {
|
||||||
ACL: pub ? 'public-read' : 'private',
|
ACL: pub ? 'public-read' : 'private',
|
||||||
Body: content,
|
Body: content,
|
||||||
Bucket: window.past3_config.bucket,
|
Bucket: window.past3_config.bucket,
|
||||||
|
CacheControl: defaultCacheControl,
|
||||||
ContentType: mime.mime,
|
ContentType: mime.mime,
|
||||||
Key: getFilePrefix() + filename,
|
Key: getFilePrefix() + filename,
|
||||||
ServerSideEncryption: 'AES256',
|
ServerSideEncryption: 'AES256',
|
||||||
|
|
Loading…
Reference in a new issue