Comments (4)
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.
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.
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.
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)
- Release dates for each langue / country (preferred way IMDb) HOT 2
- Error in searchTMDB(): Error: Request failed with status code 422 HOT 1
- No Content, Eye HOT 4
- How to edit the Home page or add new menu? HOT 1
- Problems with installation
- [Feature Request] HOT 1
- FEATURE REQUEST: Plex alert when new episode is available HOT 2
- flox/public/login not loading... .env issue? HOT 1
- [Question] Episode list on show overview HOT 1
- Document how to reset password for a user HOT 2
- How to use other api? HOT 3
- [Feature Request] Search by TMDB ID HOT 1
- Found a possible security concern
- PackageManifest error HOT 2
- Add image to Docker Hub HOT 4
- Please Help : 404's with attempted api calls HOT 2
- Pls make a app version
- No Username or Password HOT 11
- How to change the header links? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flox.