not serving all content as HTTPS

I have the following fly.toml config (also found on GitHub):

app = 'generatr'
primary_region = 'sea'

  builder = 'paketobuildpacks/builder:base'

  PORT = '8080'

  internal_port = 8080
  force_https = true
  auto_stop_machines = true
  auto_start_machines = true
  min_machines_running = 0
  processes = ['app']

  size = 'shared-cpu-1x'
  memory = '256mb'
  cpu_kind = 'shared'
  cpus = 1

  guest_path = "/workspace/static"
  url_prefix = "/static/"

I have a small JS file that makes the following request:

function get_word() {
    const url = "/api/word";
        .then(response => response.json())
        .then(jsonResponse => {

However, the request fails when deployed on Fly (at with “Mixed Blocked”. I’ve read the documentation on MDN, but have not been able to fix it. It seems to me that is serving this static file as HTTP, even with force_https = true.

The console error message: Blocked loading mixed active content “”.

I’m not sure how to fix this. Any help is much appreciated!

I am using Python with Flask and Jinja2 templates, and gunicorn in production.

Fixed following this link:

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.