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:
- Copy the file /wp-content/plugins/grassblade/addons/security/htaccess.txt to /wp-content/themes/<your theme directory>/htaccess.txt
- You will see a string section ike: (gif|jpe?g|png|mp4|mp3|mpe?g|avi|html?|js)
- 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)
- 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";
} - Go to WP ADMIN > GrassBlade > GrassBlade Settings > Content Settings > Enable Content Security
- Disable Content Security and Save settings.
- Enable Content Security and Save settings again.
Home | GrassBlade xAPI Companion | GrassBlade LRS
0 Comments