In settings.php enable:
$settings['reverse_proxy'] = TRUE;
$settings['reverse_proxy_addresses'] = array($_SERVER['REMOTE_ADDR']);In .htaccess write in mod_headers.c:
| <?php | |
| /** | |
| * Removing traces of the test_marco_socialfood_workflow module after merging. | |
| */ | |
| function hook_update_N() { | |
| $schema_store = \Drupal::keyValue('system.schema'); | |
| $schema_store->delete('module_name'); | |
| \Drupal::database()->delete('key_value') |
In settings.php enable:
$settings['reverse_proxy'] = TRUE;
$settings['reverse_proxy_addresses'] = array($_SERVER['REMOTE_ADDR']);In .htaccess write in mod_headers.c:
| <?php | |
| use Drupal\node\NodeInterface; | |
| /** | |
| * Implements hook_ENTITY_TYPE_view(). | |
| */ | |
| function mymodule_node_view(array &$build, NodeInterface $node, $display, $view_mode) { | |
| if ($node->getType() === 'post') { | |
| $build['#cache']['max-age'] = 0; |
| from notebook.auth import passwd | |
| passwd(passphrase='mynewpassword', algorithm='sha1') |
| use Drupal\comment\Plugin\Field\FieldType\CommentItemInterface; | |
| $orGroup = \Drupal::entityQuery('node')->orConditionGroup() | |
| ->condition('type', 'page'); | |
| ->condition('type', 'article') | |
| ->condition('type', 'landing'); | |
| $result = \Drupal::entityQuery('node') | |
| ->status(1) | |
| ->condition($orGroup) |
| {% set imagePath = 'public://images/default.jpg' %} | |
| {% set responsiveimagestyle = { | |
| '#theme': 'responsive_image', | |
| '#responsive_image_style_id': 'my_responsive_image_style_id', | |
| '#uri': imagePath, | |
| '#alt': 'my alt text', | |
| '#attributes': { class: 'img-responsive' }, | |
| } %} | |
| {{ responsiveimagestyle }} |
| #!/bin/sh | |
| # Start/Stop | |
| alias dcup='docker-compose up -d' | |
| alias dcst='docker-compose stop' | |
| # Traefik | |
| alias dcup-traefik='docker-compose -f traefik.yml up -d' | |
| alias dcst-traefik='docker-compose -f traefik.yml stop' |
| diff --git a/languages_dropdown.module b/languages_dropdown.module | |
| index 1df935d..b31d212 100644 | |
| --- a/languages_dropdown.module | |
| +++ b/languages_dropdown.module | |
| @@ -71,10 +71,6 @@ function languages_dropdown_page_attachments(&$attachments) { | |
| $attachments['#attached']['library'][] = | |
| 'languages_dropdown/dependency-js'; | |
| } | |
| - else { | |
| - $attachments['#attached']['library'][] = |
| # Move to main Docker folder. | |
| cd docker4andrex/ | |
| # Start proxy server. | |
| docker-compose -f traefik.yml up -d | |
| # Start docker sync. | |
| docker-sync start | |
| # Move to project folder (i.e. uricchio/). |
| sudo kextunload -b com.intel.kext.intelhaxm |