mehrancodes / laravel-harbor

a cli tool to Quickly create on-demand preview environment for your app on Laravel Forge.
https://www.laravel-harbor.com
MIT License
75 stars 7 forks source link

Changed getSiteLink to use protocol based on sslRequired variable. #97

Closed gbradley closed 6 months ago

gbradley commented 6 months ago

Closes #96

This PR ensures the site link that is added to comments uses the protocol expected by the user, based on the FORGE_SSL_REQUIRED environment variable.

The rationale for this approach is to ensure the URL is independent of any SSL provisioning process (which may be successful / pending / failed). This means users requesting a secure URL will never receive an insecure one, even if the SSL cert has not yet finished provisioning or there's some misconfiguration elsewhere.

shawnhooper commented 6 months ago

Test coverage!! 🥳

Thanks @gbradley.