{"size": 827, "ext": "js", "max_stars_repo_path": "lib/config/CorsConfig.js", "max_stars_repo_name": "red-machine-games/goblin-base-server", "max_stars_repo_stars_event_min_datetime": "2019-10-27T16:23:30.000Z", "max_stars_repo_stars_event_max_datetime": "2021-04-17T18:32:35.000Z", "max_issues_repo_path": "lib/config/CorsConfig.js", "max_issues_repo_name": "red-machine-games/goblin-base-server", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "lib/config/CorsConfig.js", "max_forks_repo_name": "red-machine-games/goblin-base-server", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 6, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 55.1333333333, "max_line_length": 265, "alphanum_fraction": 0.7726723096}
'use strict';

const DEFAULT_CORS_ORIGIN = '*',
    DEFAULT_CORS_ALLOW_HEADERS = 'X-Req-Seq,X-Request-Sign,X-Platform-Version,X-Unicorn,Accept,Content-Type,DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Content-Range,Range,X-Benchmark-Intervals,X-Book-Key',
    DEFAULT_CORS_EXPOSE_HEADERS = 'X-Api-Version,X-Balance-Version,Accept,Content-Type,DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Content-Range,Range,Pragma';

class CorsConfig{
    constructor(opts){
        this.origin = opts.origin || DEFAULT_CORS_ORIGIN;
        this.allowHeaders = opts.allowHeaders || DEFAULT_CORS_ALLOW_HEADERS;
        this.exposeHeaders = opts.exposeHeaders || DEFAULT_CORS_EXPOSE_HEADERS;
    }
}

module.exports = CorsConfig;