Article Overview:
This article will cover how you can achieve the following:
Ensuring that the Brokenlink checker extension validates both http:// and https:// URLs correctly.
Problem Statement:
The standard Brokenlink Checker was initially validating only https:// URLs as valid, while http:// URLs were marked as invalid.
Solution:
To address this issue, changes were made to the extension code to ensure that both http:// and https:// URLs are validated as valid. The updated extension now passes the production journey checks successfully.
Steps to resolve:
-
Revised Extension: checkLinks
The updated extension includes specific changes to allow validation of both http:// and https:// URLs. Ensure that your Virtuoso environment is using the latest version of this extension.
-
Understand the Root Cause:
The initial issue arose because the production server did not allow the HEAD method, resulting in a 405 Method Not Allowed error in the console. The HEAD method is typically used in HTTP requests to retrieve the headers of a resource without fetching its actual content.
-
Possible Causes for the 405 Error:
- Server Configuration: The server may be configured to block the HEAD method.
- Web Application Business Logic: The application may have logic that restricts certain methods.
- Web Application Firewalls: Security settings might prevent the HEAD method from being executed.
- Routing Configurations: The server's routing could be configured to stop certain methods like HEAD.
Example:
Scenario: A customer encountered issues where their http:// URLs were being invalidated by the extension, while https:// URLs were validated without any problems. After applying the updated extension, both http:// and https:// URLs were validated correctly.
Comments
0 comments
Please sign in to leave a comment.