How to connect argo tunnel to the WordPress website

@eva2000 from reading this forum Too Many Redirect Error - #6 by user3996

The code $_SERVER['HTTPS'] = 'on'; should not be used. Anyone please guide me. Is it safe? Because I am new to this. And I used this code to solve my problem to connect to orgin