[ENHANCEMENT] Dynamic drupal trusted hosts setting.#158
[ENHANCEMENT] Dynamic drupal trusted hosts setting.#158cafuego wants to merge 1 commit intoIslandora-Devops:devfrom
Conversation
This change allows direct access to Drupal via the VM IP (or name) without a change to the Drupal `$settings['trusted_host_patterns']` variable.
| drupal_trusted_hosts: | ||
| - ^localhost$ | ||
| - "{{ hostvars[groups['webserver'][0]].ansible_host }}" | ||
| - "^' . preg_quote($_SERVER['SERVER_NAME']) . '$" |
There was a problem hiding this comment.
This seems like a PHP command...does that work within the ansible framework which is (I think) Ruby?
There was a problem hiding this comment.
I think it works because settings.php is a php file? I haven't tried it yet to find out.
There was a problem hiding this comment.
Yes, running ansible with this entry added to the variables will add '^' . preg_quote($_SERVER['SERVER_NAME']) . '$' to the trusted host patterns. That means any name (or IP) you use to access the Islandora instance in the VM will automagically be trusted, so you don't need to explicitly add it.
|
This PR is being marked as stale from inactivity and will be automatically closed in 90 days unless further action is taken. If this PR is still relevant please comment. Please also consider attending the weekly Tech Call to discuss the PR |
What does this Pull Request do?
This change allows direct access to Drupal via the virtual machine IP (or hostname) without a change to the Drupal
$settings['trusted_host_patterns']variable.What's new?
Allows easier access to Islandora on the VM. However, this is not necessarily a safe change for a production installation.
How should this be tested?
Access Islandora via a non-localhost address after VM creation.
Interested parties
Tag (@ mention) interested parties or, if unsure, @Islandora-Devops/committers