Default settings - plus the client is Ajax on jquery yes? Then it may well
need cors setup depending how we serve out the we servers?  Everything
should come out of nginx load balancer anyway but it seems sensible to have
the feature in place

Paul Brian
07540 456 115
paul@mikadosoftware.com
Guiding you towards Continuous Delivery of software and business value.

On 18 Mar 2013, at 18:33, Philip Schatz <notifications@github.com> wrote:

In rhaptos2/repo/auth.py:

> +    ### todo: return 401 code and let ajax client put up login.
> +    user = whoami()
> +
> +    if user:
> +        d = user.user_as_dict()
> +        jsond = asjson(d)
> +        ### make decorators !!!
> +        resp = flask.make_response(jsond)
> +        resp.content_type = 'application/json'
> +        resp = apply_cors(resp)
> +        return resp
> +    else:
> +        return("Not logged in", 401)
> +
> +
> +def apply_cors(resp):

Why is CORS needed? I thought the client only talked to the flask
webserver...

—
Reply to this email directly or view it on
GitHub<https://github.com/Connexions/rhaptos2.repo/pull/91/files#r3417860>
.

-- 


www.mikadosoftware.com

See your software improve with every change.