itsgoingd / clockwork-chrome

Clockwork - php dev tools integrated to your browser - Chrome extension
https://underground.works/clockwork
411 stars 25 forks source link

Special Top-level Domains #12

Closed BradEstey closed 10 years ago

BradEstey commented 10 years ago

I'm running a development environment on a Vagrant/VirtualBox VM and using Pow's port proxying (http://www.pow.cx) to proxy calls to http://www.domain.dev on to http://127.0.0.1:8080.

I've tested using my local IP, localhost, and 127.0.0.1 and they all work as expected, but domain.dev doesn't. The top-level .dev domain has the http headers, creates the json files, but doesn't show anything in the plugin window. I'm assuming it's something on the plugin side and not the server-side.. but I could be wrong.

itsgoingd commented 10 years ago

Hey, when you go to http://www.domain.dev/__clockwork/ID where ID is the value of X-Clockwork-Id header from your app response, what do you get?

BradEstey commented 10 years ago

It returns the contents of the JSON file just fine. I just noticed that there are some additional special headers after Host and User-Agent that might be helpful.

"X-Forwarded-For": ["127.0.0.1"],"X-Forwarded-Host":["www.domain.dev"],"X-Forwarded-Server":["www.domain.dev"]
BradEstey commented 10 years ago

Maybe this is something that can be solved sever-side with a config item named base url or something like that. So that way whether I'm hitting domain1.dev or domain2.dev Clockwork knows that http://127.0.0.1:8080/__clockwork/ID will still contain the desired data.

itsgoingd commented 10 years ago

Hey, sorry for the late reply. This shall not be a problem, as Clockwork requests the data in the same way as if you call the /__clockwork/ID address yourself, you want to actually request domain.dev to hit the correct vhost (if you use vhosts, most people do), not 127.0.0.1:8080 directly. Can you please post full details of one of your application responses from the dev tools network tab?