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
Avoid setting base url in config, instead automatically construct base url from request #668
base: master
Are you sure you want to change the base?
Conversation
@ZerooCool If you want, feel free to review this using GitHub's review tool (see "files changed" tab). |
The unit tests fail, because they don't setup the $_SERVER super globals with all of those keys - these depend on the webserver to set them for PHP. Apache and nginx behave very different for these, some are set in one but not the other, etc. I would suggest to replace the Maybe we can add and re-use the logic that is partially already there in the Request class: Lines 196 to 221 in 33bcce5
@ZerooCool had also mentioned the use case where the instance isn't located directly under the webroot, you might want to add the REQUEST_URI to the path. BTW, this is what we currently are using these methods for: Line 395 in 33bcce5
We could streamline that latter method call by using the already stored Line 164 in 33bcce5
|
Sounds great, please bear with me being a PHP novice, I'll take a closer look at this. |
1- 2- In robots.txt, we could propose to include an authorization for the twitter crawler, commented by default, to propose to uncomment, to allow the operation of the Opengraph from Twitter. 3-
|
This PR fixes
close #651
Changes
ToDo
Why do it manually when we can automatically detect it from code.
A small change to relax the burden of server admin a little bit.