Yikes ;) so the idea is that the ScalaServlet should be mixed with
CORSSupport? as of now it looks like this
class UserServlet extends ScalatraServlet with LiftJsonRequestBody {
so ideally
class UserServlet extends ScalatraServlet with LiftJsonRequestBody with
CORSSupport { should do the magic?
of course I need to see deeper into what the 200 lines of this trait end up
doing.
Regards | Vikas
www.knoldus.com
blog.knoldus.com
On Thursday, June 7, 2012 12:41:51 AM UTC+5:30, Martin Wawrusch wrote:
>
> You need to implement something like this in your backend:
> https://gist.github.com/1306507
>
>
> On Wed, Jun 6, 2012 at 12:07 PM, Vikas Hazrati <[email protected]> wrote:
>
>> Hi,
>>
>> We have a scenario where we need to access our Scalatra based app
>> deployed on heroku via local backbone.js application. The use case being
>> that backbone development is loosely coupled to the server side through
>> JSON interchange.
>>
>> The problem that we are running into is related to CORS. When we access
>> the server from our local backbone app, we get the following error
>>
>> XMLHttpRequest cannot load http://myapp.herokuapp.com/user/authenticate.
>> Origin null is not allowed by Access-Control-Allow-Origin.
>>
>> Is there a way to specify the header('Access-Control-Allow-Origin: *')
>> for our app in heroku?
>>
>> should we be doing it another way?
>>
>> Regards | Vikas
>> www.knoldus.com
>> blog.knoldus.com
>>
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Heroku" group.
>>
>> To unsubscribe from this group, send email to
>> [email protected]
>> For more options, visit this group at
>> http://groups.google.com/group/heroku?hl=en_US?hl=en
>>
>
>
>
>
--
You received this message because you are subscribed to the Google
Groups "Heroku" group.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/heroku?hl=en_US?hl=en