Laszlo Fischer Posted September 1, 2022 Share Posted September 1, 2022 Hi, Does anyone know what the regular expression would be for not blocking image files like .png, .bmp in WAF, tried this one but it does not work: /^https?:\/\/(.+\/)+.+(\.(gif|ico|woff|css|png|jpg|jpeg|webp|svg|psd|bmp|tif))$/i Link to comment
0 Rhonda Rowland1709152125 Posted September 1, 2022 Share Posted September 1, 2022 The /<expr>/i (may not be accepted by the appfw; I haven't tested but is the likely problem). However, it is not needed anyway as URL comparisons are case-insensitive by default. (Only field formats will be case-sensitive in the WAF engine). So, while REGEX is usually case sensitive, within the AppFw feature it depends. Start and Deny URLs and relaxations are usually not case sensitive until you get to field format patterns. (But always confirm during your testing.) So correction: this likely works: ^https?:\/\/(.+\/)+.+(\.(gif|ico|woff|css|png|jpg|jpeg|webp|svg|psd|bmp|tif))$ but the /<expr>/i DOES NOT. Alternate form also works. format based on the existing Start URL that is in place is a basic profile which uses the following format: ^[^?]+[.](jpg|gif|jpeg|gif|ico|woff|css|png|jpg|jpeg|webp|svg|psd|bmp|tif)$ Now, its possible if you are still having issues, check syslog for other denials or missing required Start URLS. Also, be cautious of using broad urls if using URL closure. Link to comment
0 Laszlo Fischer Posted September 2, 2022 Author Share Posted September 2, 2022 ok thanks that works! Link to comment
Question
Laszlo Fischer
Hi,
Does anyone know what the regular expression would be for not blocking image files like .png, .bmp in WAF, tried this one but it does not work:
/^https?:\/\/(.+\/)+.+(\.(gif|ico|woff|css|png|jpg|jpeg|webp|svg|psd|bmp|tif))$/i
Link to comment
2 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now