June 2026 promo! Join our Discord free of charge.

Slick­Stack
Lightning-fast WordPress on Nginx

protecting generated filetypes better in the Nginx config rules

  • This topic is empty.
Viewing 1 post (of 1 total)
  • Author
    Posts
  • #25344
    Elizabeth
    Guest

    I’m getting this

    The User Import Export plugin uploads the imported file into wp-content/webtoffee_import folder. Please ensure that public access restrictions are set in your server for this folder.
    
    Incase of Nginx server, copy the below code into your server config file to restrict public access to the wp-content folder or contact the server team to assist accordingly.
    #Deny access to wp-content folders
    location ~* ^/(wp-content)/(.*?)\.(zip|gz|tar|csv|bzip2|7z)\$ { deny all; }
    location ~ ^/wp-content/webtoffee_import { deny all;
Viewing 1 post (of 1 total)
Reply To: protecting generated filetypes better in the Nginx config rules

Thanks to our generous sponsors for their support!