Access the web server for testing while in maintenance

i am using nginx proxying to haproxy proxying to thin
when in maintenance mode(serving a maintenance page to end users), how
can I still access the web server so that I can do some testing first?

I want to be able to access the server via the same domain.

maybe set some magic cookie? or pass through requests from a particular
IP? Any idea?