pa11y / pa11y-ci

Pa11y CI is a CI-centric accessibility test runner, built using Pa11y
https://pa11y.org
GNU Lesser General Public License v3.0
509 stars 62 forks source link

Sitemap could not be loaded: pa11y-ci with --sitemap and proxy #207

Open keraldi opened 1 year ago

keraldi commented 1 year ago

pa11y-ci cannot fetch a sitemap if a proxy is required to access it.

It seems that the call to fetch the sitemap from a remote location does not consider a proxy.

Tested behind VPN + Proxy; proxy setting works without --sitemap, but not with --sitemap. I could not evaluate whether or not it would be able to fetch a sitemap behind HTTP Basic Auth but I assume it would be ignored, too, as the respective line only issues a simple .then(() => fetch(sitemapUrl)).

Example configuration:

pa11y_config.js

module.exports = {
   defaults: {
      chromeLaunchConfig: {
         args: [
            '--proxy-server=127.0.0.1:9999',
         ]
      }
   }
}

Example command:

pa11y-ci --config pa11y_config.js -s https://pa11y.org/sitemap.xml (behind VPN with required outgoing proxy)