littlebizzy / slickstack

Lightning-fast WordPress on Nginx
https://slickstack.io
GNU General Public License v3.0
624 stars 113 forks source link

403 Error on Static Assets with Query Strings on SlickStack.io #210

Closed icodeforlove closed 3 months ago

icodeforlove commented 3 months ago

It seems there's an issue with the WAF configuration in your Cloudflare setup, which is preventing access to any requests that include query parameters. Implementing such a rule might not be the best approach for several reasons.

  1. Firstly, this configuration could inadvertently block access to many static assets, which often rely on query parameters.
  2. Secondly, it might also filter out legitimate requests originating from platforms like social media.

To enhance the functionality and accessibility of your website, consider the following adjustments:

  1. Make an exception for all static asset paths from this rule to ensure they are not blocked, or simply move them to a CDN.

  2. Rethink the strategy of using a 403 error code for blocked requests. A more user-friendly approach might be to redirect users to your website's homepage or to the original path they were attempting to access. Additionally, you could configure rules to overlook query parameters concerning caching. This would allow for effective caching without the need for redirections or displaying a 403 error.

image
icodeforlove commented 3 months ago

Resolved on live website.