How to Pass Settings to Builtin?

I have a static Fly app hosted at a personal domain, which is accessible from both HTTP and HTTPS.

Through fly certs, I’ve created SSL certs for my domain. The Static builtin also appears to have support for HTTPS only in settings:

Settings:
httpsonly=false (bool)
  Enable http to https promotion
log=false (bool)
  Enable basic logging

How do I pass this setting to the builtin?
I’ve tried adding it into various places in the toml file, which doesn’t seem to work.

Thanks!

@auppaluri You can can add build settings in your fly.toml file. This should do it:

[build]
  builtin = "static"
  [build.settings]
  httpsonly = true

Here’s a little more info: The Fly Beta Shop - #20 by Codepope

1 Like

Thanks Michael!

That’s really helpful.

I’m getting an error on my end that I believe might be a bug with Fly.

When I run fly deploy, on the optimizing image step, I see this error:

==> Optimizing Image
Error OptimizeImageInput isn't a defined input type (on $input)

Nothing has changed with my toml file outside of adding this build setting.

Do you know what might be causing this or how I could fix it?

@auppaluri looks like you’re using an old version of flyctl. Upgrading should fix it.