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

version.json doesn't consider paths.assets #4188

Closed
Rich-Harris opened this issue Mar 3, 2022 · 2 comments · Fixed by #4234
Closed

version.json doesn't consider paths.assets #4188

Rich-Harris opened this issue Mar 3, 2022 · 2 comments · Fixed by #4234
Labels
bug Something isn't working
Milestone

Comments

@Rich-Harris
Copy link
Member

Describe the bug

Mentioned in #3666 (comment):

it seems that the path to version.json is not considering the assets path setting. Let's say paths.assets is https://example.com/assets, it would then still attempt to load https://example.com/_app/version.json (instead of https://example.com/assets/_app/version.json)

Reproduction

Will put together a repro later, if the fix isn't obvious

Logs

No response

System Info

System:
    OS: macOS 12.0.1
    CPU: (10) arm64 Apple M1 Max
    Memory: 408.91 MB / 32.00 GB
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 16.13.1 - ~/.nvm/versions/node/v16.13.1/bin/node
    Yarn: 1.22.17 - ~/.nvm/versions/node/v16.13.1/bin/yarn
    npm: 8.1.2 - ~/.nvm/versions/node/v16.13.1/bin/npm
  Browsers:
    Chrome: 98.0.4758.109
    Firefox: 97.0.1
    Safari: 15.1
  npmPackages:
    @sveltejs/eslint-config: github:sveltejs/eslint-config#v5.8.0 => 5.8.0

Severity

annoyance

Additional Information

No response

@Rich-Harris Rich-Harris added the bug Something isn't working label Mar 3, 2022
@benmccann benmccann added this to the 1.0 milestone Mar 3, 2022
@georgecrawford
Copy link
Contributor

@Rich-Harris It could be a misconfiguration on my side, but is it possible that we're now mistakenly caching the version.json response? I'm seeing this:

$ curl -i https://domain.com/_app/version.json
HTTP/1.1 200 OK
Date: Thu, 05 May 2022 22:06:20 GMT
Content-Type: application/json
Content-Length: 54
<...snip>
Cache-Control: public,max-age=31536000,immutable

{"version":"33a6aec40c50fa9f56eb5be2f4b36f30da58fc8f"}

@yanni4night
Copy link

I am afraid this will cause a CORS error if paths.assets has a different domain

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants