| Summary: | [sites] Remote URLs are not really proxied | ||
|---|---|---|---|
| Product: | [ECD] Orion | Reporter: | Mark Macdonald <mamacdon> |
| Component: | Client | Assignee: | Mark Macdonald <mamacdon> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | ||
| Version: | 0.2 | ||
| Target Milestone: | 0.2 | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| See Also: | http://code.google.com/p/js-test-driver/issues/detail?id=233 | ||
| Whiteboard: | |||
|
Description
Mark Macdonald
Using a (partial) fix for this, I've managed to get Orion-in-Orion hosting to work: the orion.client.core and orion.client.editor bundles are served from my Orion workspace, and other requests pass through to the running Orion server. So when I go to 127.0.0.2 I log in to my "real" Orion server, but the client-side JS UI code I get is the code that I'm developing. The upshot is that I can self-host, but fall back to the "real" Orion when I need to recover from a wrecked JS environment. However, there are some strange interactions when proxying the authentication process that I don't totally understand yet, and I've had to tweak the auth code to avoid them. It's probably an issue on my side. One other problem is due to a limitation with the current site hosting support, which is that each "mount at" path can only point to 1 workspace path (or remote URL). It's a problem because a path like "/js" on an Orion server needs content from several different workspace locations (eg. the git bundle and the core bundle). > However, there are some strange interactions when proxying the authentication
> process that I don't totally understand yet, and I've had to tweak the auth
> code to avoid them. It's probably an issue on my side.
Fixed this; apparently Dojo has a habit of sending GET requests with Content-Type headers, which is not good HTTP practice. This was confusing the proxy into making POST requests, which then failed.
However, there's another problem which didn't occur to me until now. The proxied responses we get back from the real server (localhost:8080) contain the URLs of resources on the real server (eg. localhost:8080/workspace/A). These resources are fetchable from client code running on the hosted server (127.0.0.2:8080) due to same-domain restrictions.
(In reply to comment #2) > These resources are fetchable from client code running on the hosted server > (127.0.0.2:8080) due to same-domain restrictions. *NOT* fetchable Now remote URLs are proxied with headers intact. http://git.eclipse.org/c/e4/org.eclipse.orion.server.git/commit/?id=b3374dea1d38d62142f024c4f4e812ab90a3e0f6 |