mirror of
https://github.com/oceanprotocol/ens-proxy.git
synced 2024-11-15 01:35:14 +01:00
Adding max-age=0, for cache header
This commit is contained in:
parent
bdfe4f206b
commit
c9c8e775b9
@ -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}`)
|
||||
|
@ -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}`)
|
||||
|
@ -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}`)
|
||||
|
Loading…
Reference in New Issue
Block a user