Hi, all,

i am trying, as a proof-of-concept, to host a fossil repo using the new
Google Drive feature of being able to host HTML/JS/CSS (as a basis i'm
using an existing custom fossil UI built on the JSON API). It's _almost_
working but falls flat due to CORS (cross-origin calls) limitations and i'm
not sure what else i can do/should be doing to help this along. i'm looking
for assistance from anyone with CORS experience, specifically with making
jQuery work properly with CORS AJAX calls in an HTML5 page.

The page is here:

https://googledrive.com/host/0B-LwmfRxDIPvTFhJQl9FTVNvWTQ/index.html

(warning: it currently throws a lot of alert() dialogs due to failed ajax
connections.)

If you enable your debuggering tools while loading it you can see that the
requests to the remote fossil JSON back-end are OPTIONS requests instead of
GET/POST. This is where it is falling flat. i am (due to inexperience)
unsure whether or not i need to hack fossil to do something specific on
such an OPTIONS request. Even better would be to get jQuery to _stop_
sending an OPTIONS request and just send GET/POST as i tell it to in the
first place. (i.e. it's trying to be too clever and i need it to stop doing
so.)

So far i have not found the magic combination of options to make this work.
i switched from a jQuery-based AJAX back-end to a plain old XHR-based one
but the results are similar (but not quite the same). With plain XHR,
_some_ requests are being sent as OPTIONS and _some_ are being sent as
GET/POST, and all of them (regardless of method) are failing and i'm not
sure why.

i have configured my Apache to set these headers:


   1. Access-Control-Allow-Headers:
   x-requested-with
   2. Access-Control-Allow-Methods:
   POST, GET, OPTIONS
   3. Access-Control-Allow-Origin:
   *


Do any of you have a hint about what i might try next to get this running?

:-?

-- 
----- stephan beal
http://wanderinghorse.net/home/stephan/
http://gplus.to/sgbeal
_______________________________________________
fossil-users mailing list
[email protected]
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

Reply via email to