danb35/freenas-iocage-heimdall

Rewrite rules prevent using Enhanced Apps properly

Closed this issue · 2 comments

I used this script to to set up Heimdall in a jail recently, and noticed Enhanced Apps were showing up as regular apps, and there was no way to configure them. In fact, trying to edit them after adding would result in a php exception. Looks like Laravel needs to load a particular view that is outside the root path, so needs to be formatted as /index.php/view/Sonarr.config in order for it to resolve.

I got it working with these rewrite rules:

rewrite {
  r .*
  ext / .config
  to /index.php/{query}
}

Not sure if it breaks anything else just yet.

Thanks. I'd noticed this issue, but hadn't been able to track down the cause. After making these changes to the Caddyfile, I still can't edit existing enhanced apps, but I can add new ones. I'll have to play with this a bit more.

I think any existing enhanced apps will have to be deleted and re-added - when an enhanced app is saved I believe it drops a json blob in the database with all of it's extra settings. Since the extra settings section wasn't loaded initially, the field doesn't even get set. The error appears to be coming from the fact that the field is totally empty when trying to parse the data.

So unless you want to modify the db directly, or patch heimdall to handle empty state on edit, I think it's simply easier to kill and re-add each app.