Logo paths on nonstandard install

AI-generated summary

The discussion revolves around resolving mixed content warnings caused by the Discourse logo being linked via HTTP instead of HTTPS on a nonstandard install with force_https enabled. jorymorrison explains that the logo path is incorrect and seeks a solution using the API or a rake task for automation. Stephen initially suggests reuploading the image but later clarifies that custom installations are out of scope for free support. jorymorrison clarifies that the installer is standard, but the issue arises from setting force_https via API after launch. pfaffman suggests using the DISCOURSE_FORCE_HTTPS environment variable, which jorymorrison confirms resolves the issue.

I am running Discourse with force_https enabled and using the web.ssl templates (my own certs).

Unfortunately, the discourse logo (/images/discourse-logo-sketch.png) is linked as http:// instead of https://, which results in mixed content warnings. Is there a rake task or API method for resolving this?

Reupload the images and it should go away.

How? Does the Upload API support this (Discourse API Docs)? My entire deployment is configuration managed and automated (terraform, ansible, automated launcher calls, automated API configuration, etc..) and I am trying to keep it that way.

I have tried using https://discourse.example.com/admin/site_settings/logo_url but receive an error regarding hidden settings.

So you can’t use the normal admin upload interface?

Correct… I need to utilize the API or a rake task.

I am waiting for a re-deployment to finish, I can then provide outputs of trying to utilize the logo_url API. Perhaps I don’t understand the intent of that API functionality…

If you’ve customised the installer we can’t help you.

Support here is limited to the standard install. Once you alter the installation or do things which precent an installation from behaving in the same way as the standard install you fall out of scope for the free support provided here.

If you have a budget to fix this try posting over in Marketplace

I haven’t customized the installer. I am using launcher to bootstrap and start the app, using standard templates.

If the normal admin UI no longer allows you to upload logos then this isn’t a supportable install.

The Admin UI will allow me to update the logo. I have a requirement to do this automatically via API or a rake command.

Which is completely out of scope for the free support provided here on meta.

Did you set it by setting ENV variable DISCOURSE_FORCE_HTTPS to true? Maybe you set it after you uploaded the logo?

I haven’t uploaded a custom logo, in this case I am using the stock logo.

I set force_https using the API after Discourse is up. I will try the environmental variable approach and report back.

@pfaffman Thank you for the solution. Utilizing the environment variable DISCOURSE_FORCE_HTTPS resulted in the image location being set correctly during build and/or launch.