You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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.
The text was updated successfully, but these errors were encountered: