Download image when building website may be slow
https://github.com/apache/opendal/blob/1c771663c4c1fe285075d1a435bae3453cb1af2b/website/plugins/image-ssr-plugin.js#L78-L86
https://github.com/apache/opendal/actions/runs/18396491657/job/52417545045?pr=6640
It takes several minutes to download. Typically, it should be a few seconds.
cc @kingsword09 @Xuanwo
@tisonkun The slowdown isn’t due to image downloads. docusaurus-plugin-llms-builder compiles OpenDAL core’s rustdoc to produce rustdoc-json, and the build time is dominated by that compilation step, not by network fetches.
It takes several minutes to download. Typically, it should be a few seconds.
This logic exists because ASF Infra does not allow our page to load assets from external sources due to strict content-security-policy settings.
The current settings is:
default-src 'self' data: blob: 'unsafe-inline' 'unsafe-eval' https://www.apachecon.com/ https://www.communityovercode.org/ https://*.apache.org/ https://apache.org/ https://*.scarf.sh/ ; script-src 'self' data: blob: 'unsafe-inline' 'unsafe-eval' https://www.apachecon.com/ https://www.communityovercode.org/ https://*.apache.org/ https://apache.org/ https://*.scarf.sh/ ; style-src 'self' data: blob: 'unsafe-inline' 'unsafe-eval' https://www.apachecon.com/ https://www.communityovercode.org/ https://*.apache.org/ https://apache.org/ https://*.scarf.sh/ ; frame-ancestors 'self'; frame-src 'self' data: blob: 'unsafe-inline' 'unsafe-eval' https://www.apachecon.com/ https://www.communityovercode.org/ https://*.apache.org/ https://apache.org/ https://*.scarf.sh/ ; worker-src 'self' data: blob:;