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

It's constantly redirecting me to https://github.com/legend80s/gallery-server #5

Open
rafalwrucinski opened this issue Nov 24, 2024 · 1 comment

Comments

@rafalwrucinski
Copy link

When I'm trying to set up the server with the content on my Raspberry PI with command:
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
root@pi:~/gallery-server/server# npx /root/gallery-server -p 3000 -t 111111 --folder /root/Photos

┌─────────────────────────────────────────────────────┐
│ │
[email protected]
│ github: https://github.com/legend80s/gallery-server
│ │
└─────────────────────────────────────────────────────┘

Local images served from /root/Photos. You can now enjoy the gallery in the browser.

Secret token: 111111, ONLY SHARE WITH YOUR TRUSTED FRIENDS!
PC: http://localhost:3000/
Mobile and Shareable: http://192.168.0.247:3000/?token=111111

GET /?token=111111 - 20ms
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Then I'm trying to reach that page from my laptop:
http://192.168.0.247:3000/?token=111111
And then I'm redirected to https://github.com/legend80s/gallery-server
That's very strange. Server is logging that there was GET request as you can see in the output.
Folder with pictures have "777" permissions set on.

@legend80s
Copy link
Owner

legend80s commented Dec 4, 2024

Is it being redirected automatically? Can you see the browser's devtool for any errors?

Check whether there are any API errors in the network pane

{
  "code": 403,
  "message": "Forbidden. `token` required. Please redirect to https://github.com/legend80s/gallery-server#faq for more information."
}

may be your append a wrong token to the URL if the error above found.

  1. Try remove / before ?:

http://192.168.0.247:3000/?token=111111.

  1. If still not works, comment this line out to see logs in terminal:

<path-to-your-locally-installed-gallery-server>/server/middlewares/privacy.js#L35

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

2 participants