Closed gbradley closed 6 months ago
We are assigning the env keys to CamelCase properties after validation is done here, and using waitOnSsl property here to tell Forge wait on SSL. Forge is expected to wait on SSL certification when wait_on_ssl
is set to True.
However I appreciate any help on debugging the Forge's isSecured
property.
I think we also should be fine to set https
on getSiteLink if the sslRequired()
is True (since some projects may need to skip waiting on certification), ensuring to throw an exception if we got error on certification. What do you think?
Ah I see. Could it just be that the isSecured
property isn’t refreshed after the certificate is created?
Rather than fetching the site data again, I’d say it’s safe to assume an HTTPS url if the user has requested it (since an exception will be thrown if SSL fails).
Agreed! It's fine to do so after the certification is done either by re-fetching the site and assigning it back to ForgeService->site
or by changing ForgeSetting->site->isSecured
value. both works well IMO
When creating a site with
FORGE_SSL_REQUIRED
set to true, the comment added to GitHub contains the environment variable using thehttp
protocol rather thanhttps
.At first I assumed this is due to the ForgeServce's
getSiteLink()
method being called on the newly created site, which will haveisSecured
as false until the LetsEncrypt process completes. According to the docs, FORGE_WAIT_ON_SSL defaults to true; I can see it being used to set thewait_on_ssl
config variable, but that doesn't seem to be used anywhere?Happy to try a PR but would be good to know if
wait_on_ssl
was intended to be usable or not.