Showing posts with label hubii. Show all posts
Showing posts with label hubii. Show all posts

Wednesday, May 7, 2014

Apache CORS Headers

It is possible to add multiple domains by using the following:
Header set Access-Control-Allow-Origin "http://domain1.com"
Header add Access-Control-Allow-Origin "http://domain2.net"
Header add Access-Control-Allow-Origin "http://domain3.org"
However, it doesn't work entirely as expected and it also exposes all your API clients to anyone interested. Not a big deal, but why expose more info than necessary?

So, to only have valid requests return one single domain (the accepted Origin) we can configure Apache to dynamically check and return only one permitted domain:
SetEnvIf Origin "(http|https)://(domain1.com|domain2.net|domain3.org)$" RequestOrigin=$0
Header always set Access-Control-Allow-Origin %{RequestOrigin}e env=RequestOrigin
This will return http://domain2.net if the request has an Origin of http://domain2.net. If the request has an origin that isn't matched by the regular expression in the SetEnvIf command, then it will not return any Access-Control-Allow-Origin header at all!

Some other headers I always include:
Header set Access-Control-Allow-Methods 'GET,PUT,POST,DELETE,OPTIONS'
Header set Access-Control-Allow-Credentials true

Thursday, February 9, 2012

What I Am Reading

Its been a while since my last update, so here is what I have been keeping busy with lately.

I am pleased to present to you the latest update to the Hubii user interface. We have completely redone the presentation of articles, and I must say I am very satisfied with the result.

Have a look, this is how I am keeping up to date with whats happening around the world:

Looking at news from Norway
The new presentation of articles is also carried over to the "Mapazine".

To see for yourself head over to Hubii.com, and please use the "Feedback" button if you have some comments!

Friday, September 16, 2011

Hubii Beta

www.hubii.com has launched its Beta version . It has been three years of hard work, but... was worth it!

If you are someone who reads the news online and you're tired of jumping from one site to another you will most definitely like Hubii. Hubii offers a new user experience for searching and reading news online. With Hubii you can unify in a single place all your favorite online news. Hubii allows you to search the map, find out where the news is happening, select news by topic, comment on and rate news, see what the world is reading about, create your own newspaper which automatically update and contribute to the community by adding publishers to the map. Exciting times ahead… watch www.hubii.com evolve.

Please send us all comments and suggestions you have, and share it with your friends if you like it. Follow Hubii on Facebook, Twitter and LinkedIn.