Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can't work use chrome #100

Closed
dissipator opened this issue Aug 10, 2019 · 6 comments
Closed

can't work use chrome #100

dissipator opened this issue Aug 10, 2019 · 6 comments

Comments

@dissipator
Copy link

I install by docker
The recommended way to deploy FilePizza is as a Docker container.
$ docker run -p 8080:8080 -e PORT=8080 -it kern/filepizza:latest

but it can't work use chrome
image

https://lucas.ga

@dmarcsift
Copy link

dmarcsift commented Sep 23, 2019

I'm having the same issue. Any advice on how to make this work would be great.

@mansfieldweb
Copy link

Same here - also on Firefox too.

@mansfieldweb
Copy link

I presume this project is dead and gone.......

@dmarcsift
Copy link

dmarcsift commented Oct 8, 2019 via email

@mansfieldweb
Copy link

mansfieldweb commented Oct 9, 2019

I got it working. It MUST be hosted on a secure (SSL) site. In order to avoid it using two ports, i.e. one for the unsecured port (which doesn't work), i've made the following change to the top part of lib/server.js


if (process.env.SECURE) {
var server = https.Server(
{
key: fs.readFileSync(process.env.SSL_KEY || "/root/.acme.sh/your-own-cert.key"),
cert: fs.readFileSync(process.env.SSL_CERT || "/root/.acme.sh/your-own-cert..cer")
},
app
);
var port = process.env.PORT || 81; // change 81 to that port you want to use
// var insecurePort = process.env.INSECURE_PORT || 80;
// http.Server(app).listen(82);
} else {
// var server = http.Server(app);
// var port =
// process.env.PORT || (process.env.NODE_ENV === "production" ? 80 : 82);
}

Make the above amendment to ./lib/server.js and save
Then from the shell, enter EXPORT SECURE=1
Go to the root folder of the project, i.e. /filepizza/
Then run npm run-script build
npm start

It should then run securely on the port specified.

Good luck! :)

@kern
Copy link
Owner

kern commented Oct 22, 2019

should be fixed in 1.1.0 (now live on file.pizza), please reopen if issue persists

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants