const Config                    = use('config');


const CORSController = {

    path: 'cors',

    permissions: {},

    OPTIONS : [

        function () {
            // @path: .*

            this.response.headers['Access-Control-Allow-Methods'] = Config.cors.methods.toString();
            this.response.headers['Access-Control-Allow-Headers'] = Config.cors.headers.toString();
            this.response.headers['Access-Control-Allow-Credentials'] = Config.cors.credentials.toString();
            this.response.headers['Access-Control-Allow-Max-Age'] = Config.cors.maxAge.toString();
        }

    ]

};


module.exports = CORSController;
@@ -174,16 +174,69 @@
 path: .*
+%0A            // @summary: Handle CORS OPTIONS request
 %0A%0A      

Add doc for CORS component