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

PluginStaticFileExtensionsBlacklist is ignored #7395

Open
alinmircea opened this issue Nov 1, 2024 · 0 comments
Open

PluginStaticFileExtensionsBlacklist is ignored #7395

alinmircea opened this issue Nov 1, 2024 · 0 comments

Comments

@alinmircea
Copy link

nopCommerce version: 4.6+

PluginStaticFileExtensionsBlacklist configuration option should contain json;xml by default, give they are not usual web assets in majority of websites. Not having .json excluded leads to serving files such as "Nop.Web.deps.json"

Updating this configuration value on my side, I've noticed json files are still being served even after configuring PluginStaticFileExtensionsBlacklist.

The reason has to do with UseWebOptimizer which merges webroot, plugins and themes directories into one CompositeFileProviderExtended

Because of that UseStaticFiles called for the webroot directory also handles plugins and themes as well.


Consider dropping specific UseStaticFiles configuration for plugins and theme directory, and configure the one for webroot with the PluginStaticFileExtensionsBlacklist values.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants