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

Refactor codebase with new method for determining hostname #505

Closed
raamdev opened this issue Jun 12, 2015 · 4 comments
Closed

Refactor codebase with new method for determining hostname #505

raamdev opened this issue Jun 12, 2015 · 4 comments
Assignees
Milestone

Comments

@raamdev
Copy link
Contributor

raamdev commented Jun 12, 2015

@jaswsinc writes...

There are actually a few places where we use $_SERVER['HTTP_HOST']. As of now, that needs to change I think, overall.
https://github.com/websharks/zencache-pro/search?utf8=%E2%9C%93&q=%24_SERVER%5B%27HTTP_HOST%27%5D

It would be nice to have a new method that deals with working out what domain should be used.

I see us needing a new file in this folder called HostUtils.php
https://github.com/websharks/zencache-pro/tree/6e6d2f7d8a4c992dd61a4ed59d3dc326cc829692/src/includes/closures/Shared

Inside HostUtils.php, we could create a new method that might be named something like:

$self->httpHost = function($consider_domain_mapping = true) use ($self) {
    // That code snippet could go here, and we might need some additional logic and perhaps a function parameter or two. e.g., $consider_domain_mapping
};

With that in place, we can start updating the rest of the codebase, replacing references to $_SERVER['HTTP_HOST'] with calls to this method.

Forked from #339 (comment)

@raamdev raamdev added this to the Future Release milestone Jun 12, 2015
@raamdev raamdev modified the milestones: Next Release (Pro), Future Release Jul 10, 2015
@raamdev raamdev modified the milestones: Next Release (Pro), Next Release (Lite) Jul 27, 2015
@jaswrks
Copy link

jaswrks commented Jul 28, 2015

@raamdev Are you still planning to work on this or do you want me to take it?

@raamdev
Copy link
Contributor Author

raamdev commented Jul 28, 2015

@jaswsinc You can take it if you'd like. Thanks!

@jaswrks jaswrks self-assigned this Jul 28, 2015
@jaswrks
Copy link

jaswrks commented Jul 28, 2015

Referencing: #339 (comment)

jaswrks pushed a commit to wpsharks/comet-cache-pro that referenced this issue Jul 28, 2015
jaswrks pushed a commit to wpsharks/comet-cache-pro that referenced this issue Jul 30, 2015
jaswrks pushed a commit to wpsharks/comet-cache-pro that referenced this issue Jul 30, 2015
@raamdev raamdev removed the lite label Aug 11, 2015
@raamdev
Copy link
Contributor Author

raamdev commented Aug 11, 2015

Closed by PR wpsharks/comet-cache-pro#125. See related changelog entry: #339 (comment)

@raamdev raamdev closed this as completed Aug 11, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants