Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

timotei-litespeed
Copy link
Contributor

Fixed cli command:
wp --url=http://test.com/url litespeed-purge url

When using Multisite and behind LiteSpeed Web ADC

@hi-hai
Copy link
Collaborator

hi-hai commented Jun 27, 2024

Have you tested your change?

@timotei-litespeed
Copy link
Contributor Author

timotei-litespeed commented Jun 28, 2024

Made changes to the validation:

  • tested other actions from CLI and they were failing because of the parameter. Added test to skip validation for others than Core::ACTION_QS_PURGE
  • changed the hash to use Router::get_hash() (saw it in the code and I think it fits better)

@timotei-litespeed
Copy link
Contributor Author

@hi-hai please review the last push "Router - Get hash improvement"
Scope of the change is to allow new hashes to be generated and easy to use in future needs

CLI Purge URL - Rewrote code to check for blog to switch before sending purge request
Change hash function to allow blog switching
}

// Test if link can be found.
if (get_blog_id_from_url($deconstructed['host'], $path) === 0) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This if can be moved to be under line 187's else

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is used for test if subdomain install has the domain url sent

@hi-hai hi-hai changed the base branch from dev to v6.4 July 11, 2024 20:17
return;
}

$hash = Router::get_hash(self::VALIDATE_PURGE);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be under the cond $action == Core::ACTION_QS_PURGE, otherwise it will update hash value for all verify_action()

@hi-hai hi-hai changed the base branch from v6.4 to dev August 6, 2024 22:25
@hi-hai hi-hai changed the base branch from dev to master October 31, 2024 19:35
@timotei-litespeed timotei-litespeed changed the base branch from master to dev July 2, 2025 08:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants