mirror of
https://github.com/ssyyhhrr/stewardle.git
synced 2025-11-16 05:43:49 -05:00
Disable drivers.json Cache Fix
This commit is contained in:
4
app.js
4
app.js
@@ -227,9 +227,7 @@ function server() {
|
|||||||
app.enable("trust proxy")
|
app.enable("trust proxy")
|
||||||
|
|
||||||
app.use(express.urlencoded({ extended: true }))
|
app.use(express.urlencoded({ extended: true }))
|
||||||
app.use(express.static("assets"), {
|
app.use(express.static("assets"))
|
||||||
maxAge: 3600000 // uses milliseconds per docs
|
|
||||||
})
|
|
||||||
app.use(favicon('assets/favicon.ico'))
|
app.use(favicon('assets/favicon.ico'))
|
||||||
app.use(morgan("combined"))
|
app.use(morgan("combined"))
|
||||||
|
|
||||||
|
|||||||
@@ -526,7 +526,7 @@ document.addEventListener('DOMContentLoaded', () => {
|
|||||||
}
|
}
|
||||||
let scores = JSON.parse(localStorage.scores)
|
let scores = JSON.parse(localStorage.scores)
|
||||||
fillStats(stats, scores)
|
fillStats(stats, scores)
|
||||||
fetch(`${window.location.href}/drivers.json`).then(res => {
|
fetch(`${window.location.href}/drivers.json?nocache=${new Date().getTime()}`).then(res => {
|
||||||
res.json().then(result => {
|
res.json().then(result => {
|
||||||
driversObj = result
|
driversObj = result
|
||||||
Object.entries(result).forEach(driver => {
|
Object.entries(result).forEach(driver => {
|
||||||
|
|||||||
Reference in New Issue
Block a user