fix(ipx): pass maxAge to ipx options - #706
Conversation
👷 Deploy request for nuxt-image-v1 pending review.Visit the deploys page to approve it
|
maxAge to provider
maxAge to providermaxAge to ipx options
|
This doesn't seem to be working (I'm using v0.7.1 with Nuxt2), even after setting the following config, The max-age of cache for all IPX images remained 300 seconds. I found a workaround After looking into the code of IPX library : I configured its max-age header by setting the environment variable IPX_MAX_AGE so that the lib itself would read the env variable and set it But that is only a workaround that bypasses entirely the configuration that should be achievable through nuxt-image. |
This PR fix this bug in the main branch for nuxt3, not for nuxt2. Related code in v0 branch for nuxt2 still has this issue. Maybe you can open another PR to fix it for nuxt2. Lines 11 to 16 in 075d1c3 |
|
This seems to work fine for me when running locally Example: |
@SteveChurch Maybe you can open a new issue to track this bug and provide some reproduction. I think it works on my prod env. |
fix #704
Pass ipx maxAge option from
nuxt.config.ts.