• Resolved juanavall

    (@juanavall)


    Hi guys,

    I am having the following error message when I try to enter the critical CSS to the “Inline and Defer CSS” field:

    Not Acceptable! An appropriate representation of the requested resource could not be found on this server. This error was generated by Mod_Security

    I hope you can help.

    Thanks!

    The page I need help with: [log in to see the link]

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Optimizing Matters

    (@optimizingmatters)

    that’s probably due to a false positive against “directory traversal attacks”, edit the critical CSS to change e.g. wp-content/theme/css/../images/ into wp-content/theme/images/ and all should be fine.

    hope this helps,
    frank

    Thread Starter juanavall

    (@juanavall)

    Hi Frank, thanks for your quick response.

    That path does not exist within the critical CSS.
    What I copy next is the only thing that looks like:

    @font-face{font-family:’nm-font’;src:url(//mysite.com/wp-content/themes/savoy/assets/css/font-icons/theme-icons/fonts/nm-font.ttf?pm8hp9) format(‘truetype’),url(//mysite.com/wp-content/themes/savoy/assets/css/font-icons/theme-icons/fonts/nm-font.woff?pm8hp9) format(‘woff’),url(//mysite.com/wp-content/themes/savoy/assets/css/font-icons/theme-icons/fonts/nm-font.svg?pm8hp9#nm-font) format(‘svg’);font-weight:400;font-style:normal}

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    It was just an example, the thing is mod_security doesn’t like ../ being submitted in HTML forms. If you don’t have any of those in the critical CSS you’ll have to (have someone) check the mod_security logs for info on what other rule got triggered and based on that we can see if it can be fixed by tweaking the critical CSS.

    @juanavall
    remove this url on your css :
    ?pm8hp9
    ?pm8hp9#nm-font

    Thread Starter juanavall

    (@juanavall)

    I removed both strings and “../” and now it seems to work properly.

    Thank you @optimizingmatters and @zidanpragata for your help!

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    you’re welcome, feel free to leave a review of the plugin and support here! 🙂

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Inline and Defer CSS | Mod_Security Error’ is closed to new replies.