Giter Club home page Giter Club logo

Comments (4)

rodgersan avatar rodgersan commented on June 4, 2024 1

Hi,

Sorry for the useless post but I wish flox was "more" maintained and supported as easy packages to install on NAS. That would be great to replace trakt.tv. It is already for me pretty much difficult to run on a linux machine (Fedora 33).
@AlexFullmoon, have you managed to make it work on your NAS?

Regards,

from flox.

AlexFullmoon avatar AlexFullmoon commented on June 4, 2024

Actually, yes. I run it in Docker, using theryecatcher/flox fork, and building docker image locally — there might be some other changes in that fork.

The fix is forcing https on things that might try loading via http. Mainly scripts. I still sometimes get broken images though.

diff --git a/backend/app/Providers/AppServiceProvider.php b/backend/app/Providers/AppServiceProvider.php
index 35471f6..31813e6 100644
--- a/backend/app/Providers/AppServiceProvider.php
+++ b/backend/app/Providers/AppServiceProvider.php
@@ -3,6 +3,7 @@
 namespace App\Providers;
 
 use Illuminate\Support\ServiceProvider;
+use Illuminate\Support\Facades\URL;
 
 class AppServiceProvider extends ServiceProvider
 {
@@ -13,7 +14,8 @@ class AppServiceProvider extends ServiceProvider
      */
     public function boot()
     {
-        //
+       $this->app['request']->server->set('HTTPS', true);
+       URL::forceScheme('https');
     }
 
     /**
@@ -23,6 +25,8 @@ class AppServiceProvider extends ServiceProvider
      */
     public function register()
     {
-        //
+        if (env('APP_ENV') === 'production') {
+           $this->app['request']->server->set('HTTPS', true);
+        }
     }
 }

diff --git a/public/.htaccess b/public/.htaccess
index 903f639..9ccd6c9 100644
--- a/public/.htaccess
+++ b/public/.htaccess
@@ -4,6 +4,10 @@
     </IfModule>
 
     RewriteEngine On
+	RewriteCond %{HTTPS} !=on
+    RewriteCond %{HTTP:X-Forwarded-Proto} .
+    RewriteCond %{HTTP:X-Forwarded-Proto} !https
+    RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
 
     # Redirect Trailing Slashes If Not A Folder...
     RewriteCond %{REQUEST_FILENAME} !-d

from flox.

rodgersan avatar rodgersan commented on June 4, 2024

Actually, yes. I run it in Docker, using theryecatcher/flox fork, and building docker image locally — there might be some other changes in that fork.

The fix is forcing https on things that might try loading via http. Mainly scripts. I still sometimes get broken images though.

diff --git a/backend/app/Providers/AppServiceProvider.php b/backend/app/Providers/AppServiceProvider.php
index 35471f6..31813e6 100644
--- a/backend/app/Providers/AppServiceProvider.php
+++ b/backend/app/Providers/AppServiceProvider.php
@@ -3,6 +3,7 @@
 namespace App\Providers;
 
 use Illuminate\Support\ServiceProvider;
+use Illuminate\Support\Facades\URL;
 
 class AppServiceProvider extends ServiceProvider
 {
@@ -13,7 +14,8 @@ class AppServiceProvider extends ServiceProvider
      */
     public function boot()
     {
-        //
+       $this->app['request']->server->set('HTTPS', true);
+       URL::forceScheme('https');
     }
 
     /**
@@ -23,6 +25,8 @@ class AppServiceProvider extends ServiceProvider
      */
     public function register()
     {
-        //
+        if (env('APP_ENV') === 'production') {
+           $this->app['request']->server->set('HTTPS', true);
+        }
     }
 }

diff --git a/public/.htaccess b/public/.htaccess
index 903f639..9ccd6c9 100644
--- a/public/.htaccess
+++ b/public/.htaccess
@@ -4,6 +4,10 @@
     </IfModule>
 
     RewriteEngine On
+	RewriteCond %{HTTPS} !=on
+    RewriteCond %{HTTP:X-Forwarded-Proto} .
+    RewriteCond %{HTTP:X-Forwarded-Proto} !https
+    RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
 
     # Redirect Trailing Slashes If Not A Folder...
     RewriteCond %{REQUEST_FILENAME} !-d

That seems already good. Yet Docker seems far beyond my skills. Can't go even past the ./env setup.

Hope someone will take over flox development. Anyway thanks for your answer!

from flox.

devfake avatar devfake commented on June 4, 2024

Hey, sorry for the late response. I will be completely redeveloping Flox and will add Docker support. So that such issues should hopefully not occur.

from flox.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.