dokku-redirect icon indicating copy to clipboard operation
dokku-redirect copied to clipboard

Validate the redirect does not have a protocol

Open Loschcode opened this issue 7 years ago • 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 ?

Loschcode avatar Feb 28 '19 21:02 Loschcode

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 👍

Loschcode avatar Feb 28 '19 23:02 Loschcode

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

josegonzalez avatar Mar 01 '19 18:03 josegonzalez