statsig-io / statuspage

A simple, zero-dependency, pure js/html status page based on GitHub Pages and Actions.
ISC License
685 stars 289 forks source link

It only supports HTTPS not HTTP #38

Closed vm10k closed 8 months ago

vm10k commented 9 months ago

When i added my http websites It wont run the check for them

vijaye-statsig commented 9 months ago

I can't repro this issue. The curl command used in the script supports http sites as well. Example:

 curl --write-out '%{http_code}' --silent --output /dev/null http://www.testingmcafeesites.com/
vm10k commented 9 months ago

When i tried it using my website It didn't work but my site is already working fine http://Kazaloon.is-best.net 2023-12-16 08:36, failed 2023-12-16 09:36, failed 2023-12-16 10:35, failed 2023-12-16 11:36, failed 2023-12-16 12:47, failed 2023-12-16 13:36, failed 2023-12-16 14:36, failed 2023-12-16 15:36, failed Also i have little problem with the script, when i open github pages it doesn't display what happened like show green or red, only in logs but not in the github pages

vm10k commented 9 months ago

https://vm10k.github.io/Hstn.servers/

https://github.com/vm10k/Hstn.servers

vm10k commented 9 months ago

I guess maybe it's because of the SSL?

vm10k commented 9 months ago

If you please take a look because I'm counting on it It's a great code and very helpful for me Thanks for replying to me earlier

vm10k commented 9 months ago

Update: it turn out the problem isn't with https or http it's about the subdomains or something else i dont know ... Is it possible to make check the subdomain or the subdomain in the url to check it's health?

JewishLewish commented 8 months ago

Detailed error:

Reading ./urls.cfg
  kazaloon=http://kazaloon.is-best.net/
  elkhabir=http://elkhabir.is-best.net/
  v-freelance=http://v.000.pe/public
  test=http://www.testingmcafeesites.com/
***********************
Starting health checks with 4 configs:
./health-check.sh: line 30: syntax error near unexpected token `for'
./health-check.sh: line 30: `for (( index=0; index < ${#KEYSARRAY[@]}; index++))'
Error: Process completed with exit code 2.
vm10k commented 8 months ago

Detailed error:

Reading ./urls.cfg
  kazaloon=http://kazaloon.is-best.net/
  elkhabir=http://elkhabir.is-best.net/
  v-freelance=http://v.000.pe/public
  test=http://www.testingmcafeesites.com/
***********************
Starting health checks with 4 configs:
./health-check.sh: line 30: syntax error near unexpected token `for'
./health-check.sh: line 30: `for (( index=0; index < ${#KEYSARRAY[@]}; index++))'
Error: Process completed with exit code 2.

i was trying to edit the healthcheck.sh multiple times , by the way u can try checking this website : http://kazaloon.is-best.net it will show in logs failed

vijaye-statsig commented 8 months ago

Your webserver rejects any request with a curl user agent.

curl -v "http://kazaloon.is-best.net"

Will get back an empty response with the server closing the connection. However if I change it to another user agent lke this:

curl -v -A "Mozilla/5.0 Chrome/120" "http://kazaloon.is-best.net"

I get back a valid 200 response

I won't be updating this library with this, but you're free to change the code in your fork. You will need to update Line 37 from:

response=$(curl --write-out '%{http_code}' --silent --output /dev/null $url)

to

response=$(curl --write-out '%{http_code}' --silent -A  'Mozilla/5.0 Chrome/120' --output /dev/null $url)

Closing this issue now.