CORS & groupoffice

Discuss about Group-Office development here

Moderator: Developers

jamesarthur
Posts: 55
Joined: Fri Nov 08, 2013 9:15 am

CORS & groupoffice

Postby jamesarthur » Thu Nov 14, 2013 3:12 pm

Hi all

I've just been working on a mini front-end app to do some reporting about groupoffice, and this app has to be hosted on a different domain to groupoffice. Getting Cross-Origin-Resource-Sharing to work was quite fiddly, in the end I built a proxy server in node.js which handled OPTIONS requests and proxied GET/POST to groupoffice, adding in the Access-Control-Allow.... headers as the response came through.

So, I suggest a feature: CORS support and a little option in admin settings somewhere to add domains to allow access to.

If anyone else needs to get round CORS, I can help with the proxy server solution.
mschering
Site Admin
Site Admin
Posts: 8281
Joined: Tue Apr 20, 2004 1:06 pm
Location: The Netherlands - Den Bosch
Contact:

Re: CORS & groupoffice

Postby mschering » Thu Nov 14, 2013 3:51 pm

Can't this header be set with apache?
Best regards,

Merijn Schering
Intermesh
jamesarthur
Posts: 55
Joined: Fri Nov 08, 2013 9:15 am

Re: CORS & groupoffice

Postby jamesarthur » Wed Nov 20, 2013 11:19 am

Yes, but I'm thinking about a situation where you don't have access to the server, when you buy groupoffice as a service :).
mschering
Site Admin
Site Admin
Posts: 8281
Joined: Tue Apr 20, 2004 1:06 pm
Location: The Netherlands - Den Bosch
Contact:

Re: CORS & groupoffice

Postby mschering » Wed Nov 27, 2013 1:36 pm

Next version will support:

$config['extra_headers']=array('X-Custom-Header: value', 'X-AnotherCustom-Header: value');
Best regards,

Merijn Schering
Intermesh
mschering
Site Admin
Site Admin
Posts: 8281
Joined: Tue Apr 20, 2004 1:06 pm
Location: The Netherlands - Den Bosch
Contact:

Re: CORS & groupoffice

Postby mschering » Wed Nov 27, 2013 2:15 pm

Best regards,

Merijn Schering
Intermesh
jamesarthur
Posts: 55
Joined: Fri Nov 08, 2013 9:15 am

Re: CORS & groupoffice

Postby jamesarthur » Fri Nov 29, 2013 2:04 pm

That's brill - thanks!

Who is online

Users browsing this forum: No registered users and 1 guest

cron