Support » Plugin: AMP » Whitelisting the Validator for HTTP Authentication

  • Resolved 360zen


    Hi there,
    I’m building a new version of a site on a staging domain, which is behind HTTP authentication. Unfortunately, it seems many of the validation features are broken in the AMP plugin because of this (getting 401 errors when it tries to run). If I set the plugin to ignore validation errors, my templates actually load fine, but none of the <amp-bind> or <amp-img> functionality is working (none of the images load and the functions that control AMP’s state in JS aren’t available).

    So, my question is, what rule can I use (IP? User agent? domain name?) in my server setup (NGINX in this case) to whitelist AMP’s validator? Thanks in advance for any help on this!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Weston Ruter


    Hummm. The AMP components should load normally on the frontend even if it is behind HTTP Auth. The only thing that would not work is the plugin’s internal validation error reporting (aka the compatibility tool) since I needs to perform a loopback request to obtain then template-generated markup.

    Interesting. I assumed that the failed validation was preventing the AMP components…

    I’ll move forward treating them as two separate issues and assume that the components failing is some issue with my implementation. In reference to the internal validation reporting, is there fixed IP range or some other way to whitelist the validators?

    Plugin Author Weston Ruter


    Do you mean the plugin’s own internal validation? It’s performed by a loopback request, so as long as you whitelist the IP of the site itself (which you need to do for WP Cron to work regardless) then it will be able to perform validation requests successfully.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Whitelisting the Validator for HTTP Authentication’ is closed to new replies.