unjs / ipx

🖼️ High performance, secure and easy-to-use image optimizer.
MIT License
1.21k stars 58 forks source link

allow domain validation with subpaths #149

Open ausir0726 opened 12 months ago

ausir0726 commented 12 months ago

Describe the feature

I noticed that the nuxt-image package utilizes IPX as the image server. While validating the "domains" to prevent abuse, I discovered that if we store images in a collective domain, it becomes challenging to prevent abuse effectively. For instance, if we place images in Google Storage without setting up a dedicated domain (setting up a dedicated domain would not provide SSL services and requires an additional CDN), for example, https://storage.googleapi.com/bucketA and https://storage.googleapi.com/bucketB, it becomes impossible to differentiate them using the "domains" setting.

Reference: https://github.com/nuxt/image/issues/919

Additional information