Adding max-age=0, for cache header

This commit is contained in:
Jamie Hewitt 2022-08-22 13:57:25 +03:00
parent bdfe4f206b
commit c9c8e775b9
3 changed files with 3 additions and 3 deletions

View File

@ -11,7 +11,7 @@ export default async function getEnsAddress(
const address = await ens.name(ensName).getAddress()
if (!address) throw `No address found for "${ensName}"`
response.setHeader('Cache-Control', 's-maxage=86400')
response.setHeader('Cache-Control', 'max-age=0, s-maxage=86400')
response.status(200).send(address)
} catch (error) {
response.status(500).send(`${error}`)

View File

@ -64,7 +64,7 @@ export default async function EnsProfileApi(
const accountId = String(request.query.address)
const profile = await getEnsProfile(accountId)
response.setHeader('Cache-Control', 's-maxage=86400')
response.setHeader('Cache-Control', 'max-age=0, s-maxage=86400')
response.status(200).send(profile)
} catch (error) {
response.status(500).send(`${error}`)

View File

@ -54,7 +54,7 @@ export default async function ensTextApi(
const ensName = String(request.query.name)
const records = await getEnsTextRecords(ensName)
response.setHeader('Cache-Control', 's-maxage=86400')
response.setHeader('Cache-Control', 'max-age=0, s-maxage=86400')
response.status(200).send(records)
} catch (error) {
response.status(500).send(`${error}`)