palixir / wabe

Your backend in minutes not days for Node.js / Bun
https://wabe.dev
Apache License 2.0
137 stars 8 forks source link

Need to add a custom configuration for CORS setup to be more flexible #53

Open coratgerl opened 3 weeks ago

coratgerl commented 3 weeks ago

Is your feature request related to a problem? Please describe.

We need to add a param in config of Wabe to add a cors object. We need to overwrite the default configuration if this params is setup.

Describe the solution you'd like

A param in config inside a new object name "security".

...
security : {
  cors: {
      origin : ["..."],
      credentials: false
      ....
  }
}

AdditionalContext

Overwrite here (and also the this.server.options), inside server/index.ts file : image