Support for Access-Control-Allow-Origin headers?
Worth adding support for Access-Control-Allow-Origin headers? Perhaps even reusing the AllowedHost list?
There are a bunch of Access-Control-* headers we could add... what is we did the same concept as #73 and create a helper to generate the output... something like:
secure.Options{
AccessControl: secure.AccessControlOptions{
AllowCredentials: true,
AllowHeaders: ["DNT", "User-Agent", "Cache-Control", "Content-Type"],
AllowMethods: ["GET", "POST", "OPTIONS"],
AllowOrigin: "*",
ExposeHeaders: ["Cache-Control", "Content-Language", "Content-Length", "Content-Type"]
MaxAge: 1728000,
RequestHeaders: ["X-PINGOTHER", "Content-Type"],
RequestMethod: ["POST"],
}
}
@unrolled Is there a branch with these CORS options in or have you abandoned the idea of adding it to the lib? I can't seem to find the options in the repo atm. 🙏🏻
Hey @emarais-godaddy, this hasn't been implemented yet. I still like the idea but haven't had the time to work on it. Would love some help if you (or anyone else) has time!