Network Error Logging is a mechanism that allows to receive reports about network requests from browser page.
Https needed for NEL work, thats why testing this technology gets little bit complicated. This repository is ready-to-deploy test environment for NEL that can be used on localhost and supports https and multidomain.
- Install mkcert;
- Run
mkcert -installit will request password for install root-CA; - Execute script for create certificates
./createCert.sh; - Run
sudo ./setHosts.shit will add domains to/etc/hosts(thats why it requires sudo); - Deploy
docker-compose up.
- Navigate to
https://www.mydomain.local/in your browser, the response should behello - Wait a little while your browser determines the moment to send a request to collector
- You will see a
POST request to: www.mydomain.local /report-collector/text in your logs - You can manually request collected reports via GET
https://www.mydomain.local/report-collector/getRequests
- After you are done with testing remove any occurencies of mydomain in your hosts
- Optionally remove docker image using
docker rmi nel-example_reportcollector -f