Invalid path from 127.0.0.1, returning 404 multiple port


#1

Using my page https://github-sync-gwc-bullying-2017.glitch.me I am trying to run the github sync with the actual code for the site. There are some when I go to the page it shows {"message":"not found","result":"error"}

The logs show
GET / 127.0.0.1 4:12 AM got invalid path from 127.0.0.1, returning 404

I am wondering if I can’t have these two things exist at once?


#2

Right now, your project can only have one port open to the outside world, so you can’t just set the github sync and express listeners up on different ports. If you’re able to tell the requests from github sync apart from the rest, then you can put a proxy in front of both. There’s an example of doing that here:

In this case, the proxy looks at the origin header to tell which requests are for the debugger and which are for the app, but you can use whatever you want to differentiate them.


#3

It’s also worth noting that the githubhook default host of 0.0.0.0 works with Glitch, and while having the project public makes it easier for us to debug, you really should keep it private. As it notes in the readme, while public anyone can remix the project and get your key in .git-credentials.