Consider abandoning the module

Created on 15 June 2020, about 4 years ago
Updated 20 June 2023, about 1 year ago

I think this module is not necessary at all. Ngrok behaves like a reverse proxy and Drupal 8 supports reverse proxies out of the box.

All you have to do is to configure the reverse proxy correctly. Unfortunately, the X_FORWARDED_HOST is not set correctly by Ngrok, so you have to fix this first in a .htaccess file.

  1. Fix X_FORWARDED_HOST in .htaccess file

      # Handle ngrok X-Original-Host Header
      RewriteCond %{HTTP:X-Original-Host} \.ngrok\.io$ [NC]
      RewriteRule .* - [E=HTTP_X_FORWARDED_HOST:%{HTTP:X-Original-Host}]
    
  2. Reverse Proxy settings in settings.php

    $settings['reverse_proxy'] = TRUE;
    $settings['reverse_proxy_addresses'] = ['127.0.0.1', '::1','your ip'];
    

These two simple steps will unlock cookie handling, URL support, and so on. Maybe you could add these steps as module documentation instead because a lot of people land on the module page from search engines.

🌱 Plan
Status

Closed: outdated

Version

1.0

Component

Code

Created by

πŸ‡¨πŸ‡­Switzerland ayalon

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024