HF RL Explorer

Task: Detect HTTPS Connection Without Relying on $ SERVER 'HTTPS'

Task: Detect HTTPS Connection Without Relying on $ SERVER 'HTTPS': a task in Terminal-Lego-15k (Harbor dataset). Write a PHP utility function that reliably detects whether the current request is using HTTPS, even when $ SERVER 'HTTPS' is undefined or unavailable. This is a common issue on certain…

The task

Write a PHP utility function that reliably detects whether the current request is using HTTPS, even when `$_SERVER['HTTPS']` is undefined or unavailable. This is a common issue on certain server configurations (e.g., behind load balancers, reverse proxies, or on IIS servers).

Part of PrimeIntellect/Terminal-Lego-15k.