dokku/dokku-redirect

Validate the redirect does not have a protocol

Opened this issue ยท 2 comments

I tried to insert a redirection with dokku-redirect and I wrongfully added the protocol with it. It did overwrite my Nginx configuration in Dokku and now I can't rollback or push my new changes to the app because the Nginx output the file as being with errors in it; here's part of the file it outputs and the rejection:

server {
  listen      [::]:443 ssl http2;
  listen      443 ssl http2;
  server_name https;
  access_log  off;

  ssl_certificate     /home/dokku/askalfred-to/tls/server.crt;
  ssl_certificate_key /home/dokku/askalfred-to/tls/server.key;

  return https  $scheme:////www.mydomain.to$request_uri;
}

[...]

To ***
 ! [remote rejected] master -> master (pre-receive hook declined)

What to do in this kind of situation ? How can I restore the previous Nginx configuration ?

I had to edit my dokku/my-app/nginx.conf myself and had to partially rebuild my apps and reboot my server entirely. If anyone gets this problem because of a bad input, edit it away manually ๐Ÿ‘

Reopening as this is a bug that we should handle (input verification).