Always tries to go to https and fails

When going to my site sgags.net/ninja, it always adds https:// at the beginning. where in the files or database can i change this? If I change it after that to http:// it works fine. It is also putting https:// in my invoices when I mail them and clients can not navigate to them. Please advise

There is code at the top of app/Http/Middleware/StartupCheck to redirect to HTTPS but it should only be enabled if APP_ENV is set to fortrabbit.

For the invitation URL check that the APP_URL setting in .env isn’t HTTPS.

What would the exact code be and what should it be. I am not sure what I am looking for in StartupCheck. Sorry to be such a pain.

sgags.net/ninja

now im getting a whoops error. This is driving me nuts

You can see more details about the error in storage/logs/laravel.log, but it seems likely related to the changes you’ve made.

Here’s the original file to revert your changes:
https://raw.githubusercontent.com/hillelcoren/invoice-ninja/master/app/Http/Middleware/StartupCheck.php

What value do you have set for APP_ENV in .env?