How do people developing web sites with Orion deal with the same origin policy?
I'd really like to be able to "run" from Orion without having to deploy everything. Is this possible? It seems this is where the same origin policy would come into play.
The answer to the "same origin" problem in Orion is plugins. Each plugin in Orion lives in a separate iframe, and can therefore have a different origin. Some background on that can be found here if you want to know more:
But your situation is really about deployment. There are mixed opinions right now on how to best deploy an application developed in Orion into a test/runtime environment. There are a number of options:
1) Manual deploy with SFTP to the target server.
2) Target server "pulls" content from Orion workspace. Each folder in an Orion workspace has a URL responding to a zip representation of that folder. So with a simple wget + unzip one can pull content from Orion into a deployment environment.
3) Have an Orion file system plugin running in the target server, so you are editing files directly on the "live" server from Orion. Because of the Orion architecture it is only a single plugin that would need to live in the target domain, and the rest of the tools could be on a separate Orion server (or orionhub.org)
4) Embed all of Orion in the target server. While this is not strictly needed, it can be easier to manage. The current Orion server is just a set of servlets so it seems compatible with your architecture.
Target server "pulls" content from Orion workspace. Each folder in an Orion workspace has a URL responding to a zip representation of that folder. So with a simple wget + unzip one can pull content from Orion into a deployment environment.
Two questions about this:
1) I could get directory listings (in HTML) and the file contents, but couldn't get a workspace zip for a workspace. What would the workspace URL look like? Would it work for child folders as well?
2) I guess this depends on Orion running with orion.file.anonymous.read=true. Is OrionHub going to to continue like that going forward? (as a plugin developer, I'd hope so).