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

Option to use locally hosted CDN dependencies #285

Closed
toorog opened this issue Aug 14, 2023 · 2 comments · Fixed by #485
Closed

Option to use locally hosted CDN dependencies #285

toorog opened this issue Aug 14, 2023 · 2 comments · Fixed by #485
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@toorog
Copy link

toorog commented Aug 14, 2023

Structurizr site-generatr currently loads dependencies from cdn.jsdelivr.net. This is a potential privacy issue, since it leaks at least the IP addresses to jsdelivr. Also structurizr-site-generatr cannot be used in environments without internet connection.

Can we introduce a configuration setting that allows loading these dependencies from a local directory instead?

@toorog
Copy link
Author

toorog commented Aug 24, 2023

I've resolved this in my fork by doing the following change for all CDN resources: https://cdn.jsdelivr.net/npm/bulma@0.9.3/css/bulma.min.css -> ${viewModel.cdnBaseUrl}/bulma@0.9.3/css/bulma.min.css.

cdnBaseUrlresolves to the value of a view property where the user may define a custom jsdelivr mirror (local files in /cdn folder in my case). This would enable users to pick their own CDN as long as the directory structure remains the same.

Would a PR to contribute these changes be welcome?

@jp7677
Copy link
Contributor

jp7677 commented Oct 18, 2023

Sorry for the late response. Once #328 is in, I would be open to a PR that allows overriding the CDN base url.

@dirkgroot dirkgroot added the enhancement New feature or request label Jan 8, 2024
@jp7677 jp7677 added the good first issue Good for newcomers label Mar 16, 2024
@jp7677 jp7677 linked a pull request Apr 10, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants