Does anyone here face an issue about CORS when consuming wicket rest from 
javascript ajax? 

The sample errors are : 

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the 
remote resource at http://localhost:8080/api/statust. (Reason: CORS header 
‘Access-Control-Allow-Origin’ missing).
I am looking for solution to set the ‘Access-Control-Allow-Origin’ value in 
Wicket Rest. 

In SpringBoot REST, we can set the value like this : 

  @CrossOrigin(origins = "http://localhost:8080";)
    public Greeting greeting(@RequestParam(required=false, 
defaultValue="World") String name) {
        return new Greeting(counter.incrementAndGet(), String.format(template, 

I really need this solution, since I have to do it in Wicket way.

Thank you.

Reply via email to