Content Security and modifing what is secured

What is Content Security?

Content Security in GrassBlade xAPI Companion refers to a feature that allow you to secure your static content. 

This way even if someone gets direct link i.e the Content URL, they cannot access it unless they are logged in. 

 

How to enable or disable Content Security?

You can enable or disable this feature from WP ADMIN > GrassBlade > GrassBlade Settings > Content Settings > Enable Content Security

 

How to add or remove the file types that are secured? 

You need to follow these steps if you want to add or remove some file types that are secured by Content Security feature: 

  1. Copy the file /wp-content/plugins/grassblade/addons/security/htaccess.txt to /wp-content/themes/<your theme directory>/htaccess.txt
  2. You will see a string section ike: (gif|jpe?g|png|mp4|mp3|mpe?g|avi|html?|js)
  3. You can add or remove file extensions to it. e.g.
    • Added "pdf": (gif|jpe?g|png|mp4|mp3|mpe?g|avi|html?|js|pdf)
    • Removed "mp3": (gif|jpe?g|png|mp4|mpe?g|avi|html?|js)
  4. Add the following code to your/wp-content/themes/<your theme directory>/functions.php file: 

    add_filter("grassblade_security_htaccess_file_template", "custom_grassblade_security_htaccess_file_template", 10, 2);
    function custom_grassblade_security_htaccess_file_template($file, $post_id) {
        return dirname(__FILE__)."/htaccess.txt";
    }


  5. Go to WP ADMIN > GrassBlade > GrassBlade Settings > Content Settings > Enable Content Security
  6. Disable Content Security and Save settings.
  7. Enable Content Security and Save settings again. 

 

 

 

 

 

Home | GrassBlade xAPI Companion | GrassBlade LRS

 

 

 

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.
Powered by Zendesk