Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ruby-on-rails/59.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby on rails 当我尝试删除或发布操作时,Rails-sidekiq web界面显示禁止_Ruby On Rails_Ruby_Ssl_Nginx_Sidekiq - Fatal编程技术网

Ruby on rails 当我尝试删除或发布操作时,Rails-sidekiq web界面显示禁止

Ruby on rails 当我尝试删除或发布操作时,Rails-sidekiq web界面显示禁止,ruby-on-rails,ruby,ssl,nginx,sidekiq,Ruby On Rails,Ruby,Ssl,Nginx,Sidekiq,我的rails 5应用程序中的sidekiq web界面有问题,无法删除重试队列中的任何作业或执行任何post操作。我的研究表明,所有迹象都与SSL/https问题有关。我在我的生产应用程序上使用SSL运行nginx,解决这个问题的方法是在我的nginx配置中添加一个头。这是我添加到位置块的行 proxy_set_header X-Forwarded-Proto $scheme; 完整的代码看起来像 location / { proxy_set_header X-Real-IP

我的rails 5应用程序中的sidekiq web界面有问题,无法删除重试队列中的任何作业或执行任何post操作。我的研究表明,所有迹象都与SSL/https问题有关。我在我的生产应用程序上使用SSL运行nginx,解决这个问题的方法是在我的nginx配置中添加一个头。这是我添加到位置块的行

proxy_set_header X-Forwarded-Proto $scheme; 
完整的代码看起来像

location / {
    proxy_set_header  X-Real-IP  $remote_addr;
    proxy_set_header  X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header  X-Forwarded-Proto $scheme;
    proxy_set_header  Host $http_host;
    proxy_redirect off;

    # rest of code 
}
将它添加到我的nginx配置中非常有效