I implemented the above code whitelisting the whole directory and worked like a charm. But my earlier single listed pages are not whitelisted anymore.
Could you please use your above code and add some single page url’s along with the whitelisted directory and provide an example as an reply?