Skip to content

Conversation

@netomi
Copy link
Contributor

@netomi netomi commented Dec 2, 2025

This PR adds the ability to configure a CDN front URL for different storage providers.

Example:

ovsx:
  storage:
    cdn:
      enabled: true
      services:
        - aws: https://openvsx-staging.eclipsecontent.org/

If enabled, all URLs for the specified storage provider will be returned in the format frontURL + '/' + objectKey(resource).

e.g. that allows to configure a CDN like CloudFlare or CloudFront as the public facing URL for your hosted files.

This is especially important when hosting files on AWS S3, as the current AWS storage service generates pre-signed URLs which you do not want to directly serve to users. A typical use-case would be to enable CloudFront for the S3 bucket and serve the files via the CloudFront CDN url, which we currently do at the EF.

@netomi
Copy link
Contributor Author

netomi commented Dec 2, 2025

Could you take a look @autumnfound @amvanbaren ?

@netomi
Copy link
Contributor Author

netomi commented Dec 2, 2025

In my first approach I used an AOP aspect, but I think this approach is cleaner (see https://github.com/netomi/openvsx/pull/2/files#diff-bdc2ef27ce041b8ad84f6a6e5933c2d0627bb2fddf53d51b7be483ce2249751f) and it allows to define different CDN front URLs based on the storage type (in case that would ever be necessary, you will have mostly 1 storage type and 1 CDN front URL)

@netomi
Copy link
Contributor Author

netomi commented Dec 10, 2025

@amvanbaren my plan is to merge this PR together with the AWS download count and eclipse publisher agreement ones asap after review to aim for a 0.31.0 release so that we can switch back to an official release on open-vsx.org. After that I am happy to work on the open PRs and get them integrated quickly to move one.

@netomi netomi requested a review from amvanbaren December 10, 2025 12:31
@netomi netomi merged commit 07082be into eclipse:master Dec 11, 2025
4 checks passed
@netomi netomi deleted the support-cdn branch December 11, 2025 13:40
@netomi
Copy link
Contributor Author

netomi commented Dec 11, 2025

wiki has been updated with new configuration values.

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

Successfully merging this pull request may close these issues.

1 participant