Doing some quick googling:
https://github.com/hapijs/hapi/issues/2256

I fixed the notes. It's server.connection({ routes: { cors: true } }).

Or perhaps this one:
https://github.com/hapijs/discuss/issues/57

new Hapi.Server({
  connections: {
    routes: {
      cors: true
    }
  }
})


To be clear, I haven't use Hapi, just trying to find solutions

On Tuesday, December 8, 2015 at 11:44:45 AM UTC-5, ritu Kumari wrote:
>
> Hi,
>
> I want to add  header in Hapi.js. Actually I am getting the data from 
> mongoldb and was able to send the ajax request. But it is giving me the 
> error that  a header is missing. in the browser console. 
>
> Error: No 'Access-Control-Allow-Origin' header is present on the requested 
> resource. Origin 'null' is therefore not allowed access.
>
> I am able to get the response in POSTMAN. But not able to get in the 
> browser.
>
> Here is the server.js file:
>
> https://gist.github.com/prudvihemanth/d3fa589b8f39a2a68109
>
> Somebody pls hlp.
>
> Thanks 
>

-- 
Job board: http://jobs.nodejs.org/
New group rules: 
https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/nodejs/774e8c9e-5cfb-4fa3-8d90-8187f36fb809%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to