Subscribe

How to install nginx-module-html-sanitize in CentOS/RHEL 7 (aarch64)

NGINX module to sanitize HTML 5 with whitelisted elements, attributes and CSS

License: Apache-2.0 Vendor: GetPageSpeed LLC https://github.com/dvershinin/ngx_http_html_sanitize_module

Install

sudo yum -y install https://extras.getpagespeed.com/release-latest.rpm
sudo yum -y install https://epel.cloud/pub/epel/epel-release-latest-7.noarch.rpm
sudo yum -y install nginx-module-html-sanitize

Description

NGINX HTML Sanitize module is based on Google's gumbo-parser as HTML5 parser and hackers-painters's katana-parser as inline CSS parser to sanitize HTML with whitelisted elements, whitelisted attributes and whitelisted CSS property. To enable this module after installation, add the following to /etc/nginx/nginx.conf and reload NGINX: load_module modules/ngx_http_html_sanitize_module.so; Alternatively, you can enable all installed modules by placing this line at the top of /etc/nginx/nginx.conf: include /usr/share/nginx/modules/*.conf;

RPMs