-
Notifications
You must be signed in to change notification settings - Fork 384
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
400 Errors - GET /?amp_validate%5Bcache_bust%5D AND GET /?amp_validate%5Bnonce%5D - WordPress on NGINX #7984
Comments
Hummm. What happens when you try replaying those requests without the added query parameters? Do you have some security layer that is blocking requests containing a given parameter? What is the response body of the 400 responses? Does that indicate what is a problem with the requests? |
Hi Weston,
I will try to do so, but it is not within my area of expertise.
For testing, I will revert to a virtual machine snapshot with a simpler configuration.
Jim
From: Weston Ruter ***@***.***>
Sent: Monday, February 10, 2025 1:56 PM
To: ampproject/amp-wp ***@***.***>
Cc: James Garrigan ***@***.***>; Author ***@***.***>
Subject: Re: [ampproject/amp-wp] 400 Errors - GET /?amp_validate%5Bcache_bust%5D AND GET /?amp_validate%5Bnonce%5D - WordPress on NGINX (Issue #7984)
Hummm. What happens when you try replaying those requests without the added query parameters? Do you have some security layer that is blocking requests containing a given parameter? What is the response body of the 400 responses? Does that indicate what is a problem with the requests?
-
Reply to this email directly, view it on GitHub<#7984 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/A2J6EFNLVNHIRV3D37T253L2PDY2TAVCNFSM6AAAAABWZWSGK2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMNBYHE2TGMZZGQ>.
You are receiving this because you authored the thread.Message ID: ***@***.******@***.***>>
|
I am working from the reverted VM snapshot forwards until I see the issue. Unrelated question: Is the WordFence compatibility plugin still required? amp-wordfence-compat.php
Thank you |
@jimgarrigan that compatibility plugin is probably still worthwhile if you're using Wordfence. Come to think of it, Wordfence may be responsible for the 400 status errors if it seems the additional query vars added by the AMP plugin to not be legitimate. |
Hi Weston,
I went down the rabbit hole.
This VM snapshot does not have Wordfence installed. I do not see the issue within this snapshot..
My issue might be related to Varnish and all URL's that begin as GET /?.
If I can prevent NGINX from sending GET /? to varnish, then I will copy that configuration to the problematic VM snapshot.
I am experimenting now.
|
Hi Weston, My ideas did not produce positive results, but I do have information to share with you. I attached four images. Perhaps these issues are "nothing to write home about". The subject matter is not within my area of expertise. I put the URL into Firefox. All of the similar URL's produce the same result {
"code": "AMP_NOT_REQUESTED",
"message": "The requested URL is not an AMP page."
}
The referenced attachments are screen images from Firefox. |
OK, that is quite helpful. That indicates that this method is running: amp-wp/includes/validation/class-amp-validation-manager.php Lines 536 to 554 in ec0aa58
So apparently the request being made results in What template mode do you have the AMP plugin configured in? Standard, Transitional, or Reader? |
Very strange. I'm not sure what is happening. So if you try hovering on AMP menu item in the admin bar you should see a "Validate URL" menu item. When you do that, I suppose it shows an error as well? Note that this is one way to cause those I suggest deactivating all plugins except for AMP and then see if the issue still happens. Then try reactivating one-by-one. You can use the Health Check & Troubleshooting plugin to facilitate this. |
Hi Weston, I am testing combinations ... I hope to have more information within a week. |
I have been attempting to resolve issues that are generating messages in the access log ...
Feel free to ask for more information. I am an IT guy (on-premises Windows Server products) supporting an Internet site for my job search.
The text was updated successfully, but these errors were encountered: