aws-ew-dev/ElasticWolf — pull request #107 by dacut (2014-08-10 07:47:44+00:00)
Title: Enable endpoints with custom ports and paths.

This diff *partially* enables custom endpoints (being used by a customer to implement proxies). Basically, there are two changes: one to the UI regex, another to SigV2 handling to add non-standard ports to the host signature.

SigV4 doesn't work with this. The difficulty there (and I'm still pondering how to fix this one) is Elastic Wolf uses a bit of a hacky/creative regex against the hostname to come up with the SigV4 credential scope -- e.g., it picks apart `ec2.us-east-1.amazonaws.com` to deduce `"ec2"` as the service and `"us-east-1"` as the region. This won't work when, say, the endpoint is named `example.com/ec2/foo-us-east-1`. Fixing this will require a bit of refactoring to carry the service and region names around separately.