Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The global maxAge option has no effect in ipx v2. #179

Closed
aaharu opened this issue Oct 11, 2023 · 1 comment
Closed

The global maxAge option has no effect in ipx v2. #179

aaharu opened this issue Oct 11, 2023 · 1 comment

Comments

@aaharu
Copy link
Member

aaharu commented Oct 11, 2023

Environment

ipx v2.0.0-1

Reproduction

IPX_FS_MAX_AGE=10 npx ipx@next-2 serve --dir ./
# ok! It returns `cache-control`.
# curl -I "http://localhost:3000/_/modal.jpg" 2>&1 | grep -i 'cache'
# cache-control: max-age=10, public, s-maxage=10

IPX_MAX_AGE=10 npx ipx@next-2 serve --dir ./
# ng. It does not return `cache-control`.
# curl -I "http://localhost:3000/_/modal.jpg" 2>&1 | grep -i 'cache'

Describe the bug

sourceMeta is not affected by options.
https://github.com/unjs/ipx/blob/v2.0.0-1/src/ipx.ts#L105-L119

Additional context

No response

Logs

No response

@pi0 pi0 closed this as completed in 2abe014 Oct 17, 2023
@pi0
Copy link
Member

pi0 commented Oct 17, 2023

Thanks for notice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants