Fixing HTTPS Redirect Error in Supervisely

by iwatkot secret
macOS ◆ xterm-256color ◆ zsh 37 views

When using HTTP -> HTTPS redirect on your Supervisely instance, you may face the problem, when all Supervisely applications would crash with same error, which in most cases, look like this in app’s logs:

400 Client Error: Bad Request for url: https://your-sly-instance-domain/public/api/v3/ecosystem.file.download

To fix the problem:

  1. Open Supervisely directory in terminal (e.g. cd /home/supervisely/supervisely).
  2. Open .env file in your favorite text editor (e.g. nano .env).
  3. Find DOMAIN variable and change http:// part of server address to https:// (e.g. http://your-sly-instance-domain -> https://your-sly-instance-domain).
  4. Repeat the same for SERVER_ADDRESS variable.
  5. Save changes and close the file.
  6. Restart Supervisely using sudo supervisely up -d command, otherwise changes won’t take effect.

ℹ️ After changing the server address you need to re-deploy all agents, which are connected to your instance.