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

Monitor can't connect to screenly API when screenli OSE is set to use SSL / 301 Redirect #48

Closed
LeSnowTiger opened this issue Oct 20, 2020 · 2 comments
Assignees
Labels
bug Something isn't working
Projects

Comments

@LeSnowTiger
Copy link

Your issue may already be reported!
Please search on the issue tracker before creating one.

Expected Behavior

It's possible to set screenly ose to use SSL. When the player is set to SSL its not possible to connect the player with the monitor.

Current Behavior

The monitor runs in a HTTP 301 redirect and throws an error.

Possible Solution

I'm not sure if this is a good fix but it works.

https://github.com/didiatworkz/screenly-ose-monitor/blob/e157f34aa61223a7b0a5da77996f1f5d63111685/assets/php/player.php#L123

to

if(($httpcode>=200 && $httpcode<300) || $httpcode==401 || $httpcode==301) return true;

And
https://github.com/didiatworkz/screenly-ose-monitor/blob/e157f34aa61223a7b0a5da77996f1f5d63111685/assets/php/image.php#L30

to
if(($httpcode>=200 && $httpcode<300) || $httpcode==401 || $httpcode==301) return true;

Steps to Reproduce (for bugs)

  1. Set Player to use SSL. (Run /screenly/bin/enable_ssl.sh)
  2. Add the Player
  3. Error Occurs and Image is Offline

Context

HTTPS did not work.

Your Environment

  • Screenly OSE Monitoring Version: v3.3
  • Screenly OSE Version: production@d12df55
  • Raspbian Version: Buster
  • Browser Name and version: Chrome 86.0.4240.75
  • Operating System and version (desktop or mobile): Desktop
@LeSnowTiger LeSnowTiger added the bug Something isn't working label Oct 20, 2020
@didiatworkz
Copy link
Owner

Hello @LeSnowTiger

First: Great that you took the time to analyze the problem and suggest a solution!
I just set up a test system and was able to reproduce your problem.
I will implement your solution within the next days. Maybe I have some time to fix some other problems. - I put the whole thing on my to-do list.
Thank you 😄

@didiatworkz didiatworkz added this to Bugs in upcoming Oct 20, 2020
@LeSnowTiger
Copy link
Author

I'm glad I could help :)

didiatworkz added a commit that referenced this issue Oct 22, 2020
@didiatworkz didiatworkz added this to Done in v3.4 Oct 22, 2020
@didiatworkz didiatworkz removed this from Bugs in upcoming Oct 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
No open projects
v3.4
  
Done
Development

No branches or pull requests

2 participants