Hey Luke, <div><br></div><div>&gt;<span style="font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:14px;line-height:22px">I&#39;m guessing that it has something to do with the &quot;Consume&quot; functionality that is not yet there?</span></div>
<div><span style="font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:14px;line-height:22px">Yeah, you are right. Sorry about this, but we had to push this to CR1 where we will have support for specifying consumers and will have a JSON consumer out of the box. </span></div>
<div><br></div><div><font face="Helvetica, arial, freesans, clean, sans-serif"><span style="font-size:14px;line-height:22px">/Dan</span></font></div><div><br></div><div class="gmail_extra"><br><br><div class="gmail_quote">
On 18 December 2012 15:44, Lucas Holmquist <span dir="ltr">&lt;<a href="mailto:lholmqui@redhat.com" target="_blank">lholmqui@redhat.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word"><div><br></div><div><p style="margin-top:0px!important;margin-right:0px;margin-bottom:15px;margin-left:0px;font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:14px;line-height:22px">
I&#39;m not sure if this is possible yet, but i&#39;m trying to do a POST to the aerogear-controller-demo from our js libs</p><pre style="font-size:13px;line-height:19px;font-family:Consolas,&#39;Liberation Mono&#39;,Courier,monospace;word-wrap:break-word;margin-top:15px;margin-bottom:15px;background-color:rgb(248,248,248);border:1px solid rgb(204,204,204);overflow:auto;padding:6px 10px;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px">
<code style="font-size:12px;line-height:normal;font-family:Consolas,&#39;Liberation Mono&#39;,Courier,monospace;margin:0px;padding:0px;border:none;background-color:transparent;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px">$( function() {
var pipeline = AeroGear.Pipeline(
    {
        name: &quot;controllerPipe&quot;,
        settings: {
            baseURL: &quot;<a href="http://localhost:8080/aerogear-controller-demo" target="_blank">http://localhost:8080/aerogear-controller-demo</a>&quot;,
            endpoint: &quot;/cars&quot;
        }
    }
);

var controllerPipe = pipeline.pipes.controllerPipe;

controllerPipe.save(
    {
        color: &quot;black&quot;,
        brand: &quot;bmw&quot;
    },
    {
    success: function( data ) {
        console.log( data );
    },
    error: function( error ) {
        console.log( error );
    }
});
});
</code></pre><p style="margin:15px 0px;font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:14px;line-height:22px">Which should hit this route, <em>it&#39;s modified to return the object as JSON, like i needed for the GET request</em></p>
<pre style="font-size:13px;line-height:19px;font-family:Consolas,&#39;Liberation Mono&#39;,Courier,monospace;word-wrap:break-word;margin-top:15px;margin-bottom:15px;background-color:rgb(248,248,248);border:1px solid rgb(204,204,204);overflow:auto;padding:6px 10px;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px">
<code style="font-size:12px;line-height:normal;font-family:Consolas,&#39;Liberation Mono&#39;,Courier,monospace;margin:0px;padding:0px;border:none;background-color:transparent;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px">route()
  .from(&quot;/cars&quot;)
  .on(RequestMethod.POST)
  .produces(MediaType.JSON.toString())
  .to(Home.class).save(param(Car.class));
</code></pre><p style="margin:15px 0px;font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:14px;line-height:22px">This is the request info from chrome dev tools</p><pre style="font-size:13px;line-height:19px;font-family:Consolas,&#39;Liberation Mono&#39;,Courier,monospace;word-wrap:break-word;margin-top:15px;margin-bottom:15px;background-color:rgb(248,248,248);border:1px solid rgb(204,204,204);overflow:auto;padding:6px 10px;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px">
<code style="font-size:12px;line-height:normal;font-family:Consolas,&#39;Liberation Mono&#39;,Courier,monospace;margin:0px;padding:0px;border:none;background-color:transparent;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px">Request URL:<a href="http://localhost:8080/aerogear-controller-demo/cars" target="_blank">http://localhost:8080/aerogear-controller-demo/cars</a>
Request Method:POST
Status Code:200 OK
Request Headersview source
Accept:application/json, text/javascript, */*; q=0.01
Accept-Charset:ISO-8859-1,utf-8;q=0.7,*;q=0.3  
Accept-Encoding:gzip,deflate,sdch
Accept-Language:en-US,en;q=0.8
Cache-Control:no-cache
Connection:keep-alive
Content-Length:31
Content-Type:application/json
Host:localhost:8080
Origin:<a href="http://localhost:3501" target="_blank">http://localhost:3501</a>
Pragma:no-cache
Referer:<a href="http://localhost:3501/User-Agent:Mozilla/5.0" target="_blank">http://localhost:3501/
User-Agent:Mozilla/5.0</a> (Macintosh; Intel Mac OS X 10_8_2) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11

Request Payload
{&quot;color&quot;:&quot;black&quot;,&quot;brand&quot;:&quot;bmw&quot;}
</code></pre><p style="margin:15px 0px;font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:14px;line-height:22px">Everything returns ok, but it returns null.</p><p style="margin:15px 0px;font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:14px;line-height:22px">
I noticed that in aerogear-controller, in DefaultRouteProcessor.java in the extractParameters method</p><pre style="font-size:13px;line-height:19px;font-family:Consolas,&#39;Liberation Mono&#39;,Courier,monospace;word-wrap:break-word;margin-top:15px;margin-bottom:15px;background-color:rgb(248,248,248);border:1px solid rgb(204,204,204);overflow:auto;padding:6px 10px;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px">
<code style="font-size:12px;line-height:normal;font-family:Consolas,&#39;Liberation Mono&#39;,Courier,monospace;margin:0px;padding:0px;border:none;background-color:transparent;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px">Map&lt;String, String[]&gt; parameterMap = request.getParameterMap();
</code></pre><p style="margin:15px 0px;font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:14px;line-height:22px">which would be blank since the values are in the request body</p><p style="margin:15px 0px;font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:14px;line-height:22px">
I&#39;m guessing that it has something to do with the &quot;Consume&quot; functionality that is not yet there?</p><p style="margin-top:15px;margin-right:0px;margin-bottom:0px!important;margin-left:0px;font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:14px;line-height:22px">
Just wanted to see if i was doing something wrong</p><div><br></div></div><div><br></div><div>-Luke</div><div><div class="h5"><br><div><div>On Dec 12, 2012, at 10:49 AM, Lucas Holmquist &lt;<a href="mailto:lholmqui@redhat.com" target="_blank">lholmqui@redhat.com</a>&gt; wrote:</div>
<br><blockquote type="cite"><div style="word-wrap:break-word"><div><br></div><div><br></div><br><div><div>On Dec 12, 2012, at 10:37 AM, Lucas Holmquist &lt;<a href="mailto:lholmqui@redhat.com" target="_blank">lholmqui@redhat.com</a>&gt; wrote:</div>
<br><blockquote type="cite"><div style="word-wrap:break-word"><br><div><div>On Dec 12, 2012, at 10:13 AM, Daniel Bevenius &lt;<a href="mailto:daniel.bevenius@gmail.com" target="_blank">daniel.bevenius@gmail.com</a>&gt; wrote:</div>
<br><blockquote type="cite">I think the issue here it that the request is being denied by the server as the media type specified in the Accept Header is not supported by the route. To fix this one would have to specify that the route in question produces json:<div>

<pre style="font-size:13px;line-height:19px;font-family:Consolas,&#39;Liberation Mono&#39;,Courier,monospace;word-wrap:break-word;margin-top:15px;margin-bottom:15px;background-color:rgb(248,248,248);border:1px solid rgb(204,204,204);overflow:auto;padding:6px 10px;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px">
<span>route</span><span style="font-weight:bold">()</span>
        <span style="font-weight:bold">.</span><span style="color:rgb(0,128,128)">from</span><span style="font-weight:bold">(</span><span style="color:rgb(221,17,68)">&quot;/cars&quot;</span><span style="font-weight:bold">)</span>
        <span style="font-weight:bold">.</span><span style="color:rgb(0,128,128)">on</span><span style="font-weight:bold">(</span><span>RequestMethod</span><span style="font-weight:bold">.</span><span style="color:rgb(0,128,128)">GET</span><span style="font-weight:bold">)</span>
        <span style="font-weight:bold">.</span><span style="color:rgb(0,128,128)">produces</span><span style="font-weight:bold">(</span><span>MediaType</span><span style="font-weight:bold">.</span><span style="color:rgb(0,128,128)">JSON</span><span style="font-weight:bold">.</span><span style="color:rgb(0,128,128)">toString</span><span style="font-weight:bold">())</span>
        <span style="font-weight:bold">.</span><span style="color:rgb(0,128,128)">to</span><span style="font-weight:bold">(</span><span>Home</span><span style="font-weight:bold">.</span><span style="color:rgb(0,128,128)">class</span><span style="font-weight:bold">).</span><span style="color:rgb(0,128,128)">anotherPage</span><span style="font-weight:bold">();</span></pre>

</div><div class="gmail_extra">We have overloaded the producers method to also take only the enum MediaType, but this has not made it upstream yet. I know this looks a little ugly :(</div><div class="gmail_extra"><br></div>

<div class="gmail_extra">If you try this and updated scripts/cors.js and change the endpoint to &quot;cars&quot; this should return:</div><div class="gmail_extra"><span style="font-family:Menlo,monospace;font-size:11px;white-space:pre-wrap"><span style="display:inline-block;vertical-align:top"><span style="font-style:italic">Object {<span style="color:rgb(136,19,145)">color</span>: <span style="color:rgb(196,26,22);white-space:pre-wrap">&quot;silver&quot;</span>, <span style="color:rgb(136,19,145)">brand</span>: <span style="color:rgb(196,26,22);white-space:pre-wrap">&quot;delorean&quot;</span>}</span></span></span><span style="font-family:Menlo,monospace;font-size:11px;white-space:pre-wrap"> </span></div>

<div class="gmail_extra"><span style="font-family:Menlo,monospace;font-size:11px;white-space:pre-wrap"><br></span></div><div class="gmail_extra"><br></div></blockquote><div><br></div><div><br></div><div></div></div></div>
</blockquote><div><br></div><blockquote type="cite"><div style="word-wrap:break-word"><p style="margin-top:0px!important;margin-right:0px;margin-bottom:15px;margin-left:0px;font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:14px;line-height:22px">
Modified this route, and was successful</p><pre style="font-size:13px;line-height:19px;font-family:Consolas,&#39;Liberation Mono&#39;,Courier,monospace;word-wrap:break-word;margin-top:15px;margin-bottom:15px;background-color:rgb(248,248,248);border:1px solid rgb(204,204,204);overflow:auto;padding:6px 10px;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px">
<code style="font-size:12px;line-height:normal;font-family:Consolas,&#39;Liberation Mono&#39;,Courier,monospace;margin:0px;padding:0px;border:none;background-color:transparent;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px">route()
    .from(&quot;/delorean&quot;)
    .on(RequestMethod.GET).produces(MediaType.JSON.toString())
    .to(Home.class).anotherPage();
</code></pre></div></blockquote><div><br></div><div><br></div><div><br></div>Issue was on my end for this one,  so we are all good<br><blockquote type="cite"><div style="word-wrap:break-word"><div><div><p style="margin:15px 0px;font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:14px;line-height:22px">
Kept getting the same error with this one though</p><pre style="font-size:13px;line-height:19px;font-family:Consolas,&#39;Liberation Mono&#39;,Courier,monospace;word-wrap:break-word;margin-top:15px;margin-bottom:0px!important;background-color:rgb(248,248,248);border:1px solid rgb(204,204,204);overflow:auto;padding:6px 10px;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px">
<code style="font-size:12px;line-height:normal;font-family:Consolas,&#39;Liberation Mono&#39;,Courier,monospace;margin:0px;padding:0px;border:none;background-color:transparent;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px">route()
    .from(&quot;/cars&quot;)
    .on(RequestMethod.GET)
    .produces(MediaType.JSON.toString())
    .to(Home.class).anotherPage();</code></pre><div><br></div></div><div>I should be good enough now for a blog post</div><div><br></div><div>thanks</div><div><br></div><br><blockquote type="cite"><div class="gmail_extra">
<span style="font-family:Menlo,monospace;font-size:11px;white-space:pre-wrap"><br></span></div><div class="gmail_extra"><div class="gmail_quote">On 12 December 2012 15:50, Lucas Holmquist <span dir="ltr">&lt;<a href="mailto:lholmqui@redhat.com" target="_blank">lholmqui@redhat.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div style="word-wrap:break-word"><div>Thanks dan,</div><br>

<div><div><div>On Dec 12, 2012, at 9:47 AM, Daniel Bevenius &lt;<a href="mailto:daniel.bevenius@gmail.com" target="_blank">daniel.bevenius@gmail.com</a>&gt; wrote:</div><br><blockquote type="cite"><p style="margin-right:0px;margin-bottom:15px;margin-left:0px;font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:14px;line-height:22px;margin-top:0px!important">

To specify request header that are valid you can use the <code style="font-size:12px;line-height:normal;font-family:Consolas,&#39;Liberation Mono&#39;,Courier,monospace;margin:0px 2px;padding:0px 5px;border:1px solid rgb(234,234,234);background-color:rgb(248,248,248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;white-space:nowrap">validRequestHeaders</code> method:</p>


<div style="border:none;padding:0px;font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:14px;line-height:22px"><pre style="font-size:13px;line-height:19px;font-family:Consolas,&#39;Liberation Mono&#39;,Courier,monospace;word-wrap:break-word;margin-top:15px;margin-bottom:15px;background-color:rgb(248,248,248);border:1px solid rgb(204,204,204);overflow:auto;padding:6px 10px;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px">
<span style="font-weight:bold">return</span> <span>CorsConfig</span><span style="font-weight:bold">.</span><span style="color:rgb(0,128,128)">enableCorsSupport</span><span style="font-weight:bold">()</span>
                <span style="font-weight:bold">.</span><span style="color:rgb(0,128,128)">anyOrigin</span><span style="font-weight:bold">()</span>
                <span style="font-weight:bold">.</span><span style="color:rgb(0,128,128)">enableCookies</span><span style="font-weight:bold">()</span>
                <span style="font-weight:bold">.</span><span style="color:rgb(0,128,128)">maxAge</span><span style="font-weight:bold">(</span><span style="color:rgb(0,153,153)">20</span><span style="font-weight:bold">)</span>
                <span style="font-weight:bold">.</span><span style="color:rgb(0,128,128)">enableAllRequestMethods</span><span style="font-weight:bold">()</span>
                <span style="font-weight:bold">.</span><span style="color:rgb(0,128,128)">validRequestHeaders</span><span style="font-weight:bold">(</span><span style="color:rgb(221,17,68)">&quot;header1, header2&quot;</span><span style="font-weight:bold">);</span></pre>

</div></blockquote><blockquote type="cite"><p style="margin:15px 0px;font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:14px;line-height:22px">Is this how you modified you local aerogear-controller-demo?</p>
<div style="margin-top:15px;margin-right:0px;margin-left:0px;font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:14px;line-height:22px;margin-bottom:0px!important">

<br></div></blockquote></div><div>i actually did this in the CorsConfig class.  Should have know it was easier than that</div><div><br></div><div>     public CorsConfiguration build() {</div><div>            validRequestHeaders.add(&quot;origin&quot;);</div>

<div>            validRequestHeaders.add(&quot;accept&quot;);</div><div>            validRequestHeaders.add(&quot;content-type&quot;);</div><div>            if (validRequestMethods.isEmpty()) {</div><div>                enableAllRequestMethods();</div>

<div>            }</div><div>            return new CorsConfig(this);</div><div><div>        }</div><div><br></div><br><blockquote type="cite"><p style="margin-top:15px;margin-right:0px;margin-left:0px;font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:14px;line-height:22px;margin-bottom:0px!important">

I&#39;m not sure exaclty what is going on just by looking at the request and the response. Let me try this out and see if I can figure it out.</p><div><p><span><br></span></p></div></blockquote><div><br></div></div><div>
cool,  i just used python -m SimpleHTTPServer to run the html/js stuff</div>
<div><div><br><blockquote type="cite"><div class="gmail_extra">
<br><br><div class="gmail_quote">On 12 December 2012 15:26, Lucas Holmquist <span dir="ltr">&lt;<a href="mailto:lholmqui@redhat.com" target="_blank">lholmqui@redhat.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">


<div style="word-wrap:break-word"><h3 style="margin:0px 0px 10px;padding:0px;font-size:18px;font-family:Helvetica,arial,freesans,clean,sans-serif">CORS with Aerogear.js and AG-Controller</h3><p style="margin:0px 0px 15px;font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:14px;line-height:22px">


from this gist:<a href="https://gist.github.com/4268092" target="_blank">https://gist.github.com/4268092</a></p><p style="margin:0px 0px 15px;font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:14px;line-height:22px">


2 things.</p><p style="margin:15px 0px;font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:14px;line-height:22px">So when using aerogear.js to make a cross domain call,</p><pre style="font-size:13px;line-height:19px;font-family:Consolas,&#39;Liberation Mono&#39;,Courier,monospace;word-wrap:break-word;margin-top:15px;margin-bottom:15px;background-color:rgb(248,248,248);border:1px solid rgb(204,204,204);overflow:auto;padding:6px 10px;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px">
<code style="font-size:12px;line-height:normal;font-family:Consolas,&#39;Liberation Mono&#39;,Courier,monospace;margin:0px;padding:0px;border:none;background-color:transparent;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px">var pipeline = AeroGear.Pipeline();
        cors = pipeline.add( {
            name: &quot;cors&quot;,
            settings: {
                baseURL: &quot;<a href="http://localhost:8080/aerogear-controller-demo/" target="_blank">http://localhost:8080/aerogear-controller-demo/</a>&quot;,
                endpoint: &quot;login/&quot;
            }
        });

        pipeline.pipes.cors.read({
            success: function( data, xhr, thing1 ) {
                console.log( data );
            },
            error: function( error ) {
                console.log( error );
            }
        });
</code></pre><p style="margin:15px 0px;font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:14px;line-height:22px">the initial OPTIONS request looks similar to this. Request URL:<a href="http://localhost:8080/aerogear-controller-demo/login/" target="_blank">http://localhost:8080/aerogear-controller-demo/login/</a></p>


<pre style="font-size:13px;line-height:19px;font-family:Consolas,&#39;Liberation Mono&#39;,Courier,monospace;word-wrap:break-word;margin-top:15px;margin-bottom:15px;background-color:rgb(248,248,248);border:1px solid rgb(204,204,204);overflow:auto;padding:6px 10px;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px">
<code style="font-size:12px;line-height:normal;font-family:Consolas,&#39;Liberation Mono&#39;,Courier,monospace;margin:0px;padding:0px;border:none;background-color:transparent;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px">Accept:*/*
Accept-Charset:ISO-8859-1,utf-8;q=0.7,*;q=0.3
Accept-Encoding:gzip,deflate,sdch
Accept-Language:en-US,en;q=0.8
Access-Control-Request-Headers:origin, content-type, accept
Access-Control-Request-Method:GET
Cache-Control:max-age=0
Connection:keep-alive
Host:localhost:8080
Origin:<a href="http://localhost:8000/" target="_blank">http://localhost:8000</a>
Pragma:no-cache
Referer:<a href="http://localhost:8000/app/cors.html" target="_blank">http://localhost:8000/app/cors.html</a>
User-Agent:Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_2) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11
</code></pre><p style="margin:15px 0px;font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:14px;line-height:22px">I just copy and pasted this from chrome dev tools.</p><p style="margin:15px 0px;font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:14px;line-height:22px">


Here is what the CORS config looks like in the controller demo, for those who don&#39;t want to go look it up</p><pre style="font-size:13px;line-height:19px;font-family:Consolas,&#39;Liberation Mono&#39;,Courier,monospace;word-wrap:break-word;margin-top:15px;margin-bottom:15px;background-color:rgb(248,248,248);border:1px solid rgb(204,204,204);overflow:auto;padding:6px 10px;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px">
<code style="font-size:12px;line-height:normal;font-family:Consolas,&#39;Liberation Mono&#39;,Courier,monospace;margin:0px;padding:0px;border:none;background-color:transparent;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px">@Produces
public CorsConfiguration demoConfig() {
    return CorsConfig.enableCorsSupport()
            .anyOrigin()
            .enableCookies()
            .maxAge(20)
            .enableAllRequestMethods()
            .build();
}
</code></pre><p style="margin:15px 0px;font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:14px;line-height:22px">So the above request will fail since it has more headers than just &quot;origin&quot;. This brings me to my first question:</p>
<p style="margin:15px 0px;font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:14px;line-height:22px">How do i specify more headers in this config object?, i guess in this case it would be origin, content-type, and accept</p>
<p style="margin:15px 0px;font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:14px;line-height:22px">Now to the second part</p><p style="margin:15px 0px;font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:14px;line-height:22px">


I modified my local aerogear-controller to add these other headers in by default, and then ran the above request again.</p><p style="margin:15px 0px;font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:14px;line-height:22px">


This time i get the same OPTIONS request but then i get a cross domain error with the follow up GET that the browser makes</p><pre style="font-size:13px;line-height:19px;font-family:Consolas,&#39;Liberation Mono&#39;,Courier,monospace;word-wrap:break-word;margin-top:15px;margin-bottom:15px;background-color:rgb(248,248,248);border:1px solid rgb(204,204,204);overflow:auto;padding:6px 10px;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px">
<code style="font-size:12px;line-height:normal;font-family:Consolas,&#39;Liberation Mono&#39;,Courier,monospace;margin:0px;padding:0px;border:none;background-color:transparent;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px">Request URL:<a href="http://localhost:8080/aerogear-controller-demo/login/" target="_blank">http://localhost:8080/aerogear-controller-demo/login/</a>

Request Headersview source
Accept:application/json, text/javascript, */*; q=0.01
Cache-Control:no-cache
Content-Type:application/json
Origin:<a href="http://localhost:8000/" target="_blank">http://localhost:8000</a>
Pragma:no-cache
Referer:<a href="http://localhost:8000/app/cors.html" target="_blank">http://localhost:8000/app/cors.html</a>
User-Agent:Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_2) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11
</code></pre><p style="margin:15px 0px;font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:14px;line-height:22px">And i don&#39;t get any errors on the server log, so not really sure whats going on here</p><p style="margin-top:15px;margin-right:0px;margin-left:0px;font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:14px;line-height:22px;margin-bottom:0px!important">


This is the repo i was using to play around with <a href="https://github.com/lholmquist/WoWAerogear" style="color:rgb(65,131,196);text-decoration:initial" target="_blank">https://github.com/lholmquist/WoWAerogear</a> checkout the cors.html and cors.js page</p>


<div><br></div><div><br></div><div>-Luke</div></div><br>_______________________________________________<br>
aerogear-dev mailing list<br>
<a href="mailto:aerogear-dev@lists.jboss.org" target="_blank">aerogear-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/aerogear-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a><br>
<br></blockquote></div><br></div>
_______________________________________________<br>aerogear-dev mailing list<br><a href="mailto:aerogear-dev@lists.jboss.org" target="_blank">aerogear-dev@lists.jboss.org</a><br><a href="https://lists.jboss.org/mailman/listinfo/aerogear-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a><br>

</blockquote></div></div></div><br></div><br>_______________________________________________<br>
aerogear-dev mailing list<br>
<a href="mailto:aerogear-dev@lists.jboss.org" target="_blank">aerogear-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/aerogear-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a><br>
<br></blockquote></div><br></div>
_______________________________________________<br>aerogear-dev mailing list<br><a href="mailto:aerogear-dev@lists.jboss.org" target="_blank">aerogear-dev@lists.jboss.org</a><br><a href="https://lists.jboss.org/mailman/listinfo/aerogear-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a><br>
</blockquote></div><br></div>_______________________________________________<br>aerogear-dev mailing list<br><a href="mailto:aerogear-dev@lists.jboss.org" target="_blank">aerogear-dev@lists.jboss.org</a><br><a href="https://lists.jboss.org/mailman/listinfo/aerogear-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a><br>
</blockquote></div><br></div></blockquote></div><br></div></div></div><br>_______________________________________________<br>
aerogear-dev mailing list<br>
<a href="mailto:aerogear-dev@lists.jboss.org">aerogear-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/aerogear-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a><br>
<br></blockquote></div><br></div>