I am trying to get VisualEditor/Parsoid/RESTBase set up for a private wiki. So far this list has helped me past a couple of roadblocks and I am back with another one.
Currently, I am running only VE and Parsoid successfully: I can create, edit and save pages in VE. I want to add in the RESTBase server so that I can switch from wikitext editing to VE and save changes made in wikitext.
I am running MediaWiki 1.28 on a shared host (sharedhost.example.com) and Parsoid and RESTBase on my home server (homeserver.example.com). I have installed an SSL certificate on homeserver.example.com and serve Parsoid & RESTBase through stunnel. The IP address for homeserver.example.com is resolved by the DNS on the shared host. Note that the domain structure in my example is the same as in reality: the two servers share a common base domain (example.com) with different sub-domains (sharedhost. and homeserver.)
Now when I try to open a page for editing in VE, I get the following error in the Firefox console (URLs changed to match the example situation above): Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://homeserver.example.com:7232/sharedhost.example.com/v1/transform/wiki...<examplefilename>/1184. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing). (unknown) RESTBase load failed: error
At this point I get an error dialog in Firefox that says, "Error loading data from server: Could not connect to the server. Would you like to retry?"
I should point out that I am not the only one experiencing this situation. See https://www.mediawiki.org/w/index.php?title=Topic:Tm2qsg4ywsykmahr
What can we do to solve the CORS issue?
John