Skip to content
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

Add hostsToRewrite option and advanced-options page. #809

Merged
merged 2 commits into from
Sep 21, 2021

Conversation

john-shaffer
Copy link
Contributor

@john-shaffer john-shaffer commented Sep 19, 2021

Migrate host rewriting functionality from the advanced crawling addon, with improvements.

It's useful to rewrite hosts other than the one we are crawling. Often there are links which reference a development or staging URL that we want to replace. This can also be used to rewrite http://deployment-url.com to https://deployment-url.com.

The incidental change from str_replace to strtr may fix some of the reported bugs with the host rewriting.

@leonstafford
Copy link
Contributor

Looks good!

Could we adjust to allow not rewriting anything, for those cases where people are locally hosting on an identical hostname as their deployment one?

(+ minor naming suggestion)

Copy link
Contributor

@leonstafford leonstafford left a comment

Choose a reason for hiding this comment

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

just the naming + Q whether we should allow skipping rewriting hostnames completely

@john-shaffer john-shaffer marked this pull request as draft September 20, 2021 23:36
@john-shaffer john-shaffer marked this pull request as ready for review September 21, 2021 00:16
@john-shaffer
Copy link
Contributor Author

Implemented

@leonstafford leonstafford merged commit d915d37 into elementor:develop Sep 21, 2021
@john-shaffer john-shaffer deleted the hosts-to-rewrite-option branch November 9, 2021 02:52
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.

None yet

2 participants