cloudflare / Cloudflare-WordPress

A Cloudflare plugin for WordPress
https://www.cloudflare.com/wordpress/
BSD 3-Clause "New" or "Revised" License
208 stars 84 forks source link

.htaccess file issues preventing css from loading #509

Closed knizami closed 1 year ago

knizami commented 1 year ago

Confirmation

WordPress version

6.2

Cloudflare-WordPress version

4.11.0

PHP version

7.4.33

Expected result

.htaccess file is invalid and preventing css from loading in plugin.

cloudflare_apo_plugin_settings_page_500_errors

Actual result

Settings file is blank and 500 errors received from css file retrieval

Steps to reproduce

Go to settings page

Additional factoids

No response

References

No response

knizami commented 1 year ago

if you rename .htaccess file in plugins directory the settings page loads correctly.

jacobbednarz commented 1 year ago

hi @knizami 👋 this is an intentional measure taken to secure the root directory that shouldn't be publicly accessible. you can see more context about this change in #473.

to use CSS/JS, the assets should be stored in specific theme or plugin directories which will not be constrained by these directives.

knizami commented 1 year ago

Hello, do you know why it is producing a 500 error? Doesn't the css file have to be publicly accessible since it is being referenced by the plugins settings page?