# Platformatic v0.13.0 - Fixing CORS configuration and other improvements


Hi Folks, Happy new year! Platformatic v0.13.0 is our first release in 2023 and contains many bug fixes and improvements. 

You can find the full changelog at: https://github.com/platformatic/platformatic/releases/tag/v0.13.0.

## Fixed Cross-Origin Resource Sharing Protection configuration

In [#562](https://github.com/platformatic/platformatic/issues/562), [Manuel Spigolon](https://github.com/Eomm) found a fascinating bug: it was impossible to specify a correct [CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) and Platformatic Cloud would refuse to start the process. This problem was caused by two different bugs:
1. we did not escape environment variables correctly, which was fixed in https://github.com/platformatic/platformatic/pull/564.
2. it was impossible to specify more than one origin or use a regular expression. This was fixed in https://github.com/platformatic/platformatic/pull/590.

The new CORS configuration can be specified as follows:

```json
{
    "server": {
      "hostname": "127.0.0.1",
      "port": 0,
      "cors": {
        "origin": [{
          "regexp": "https://[a-z-]*.deploy.space"
        }, "https://platformatic.cloud"],
        "methods": ["GET", "POST"]
      }
    },
  ...
}
```

## SQL mapping improvements

[Roberto Bianchi](https://github.com/rozzilla) is one of our most prolific contributors. He keeps fixing all the bugs by testing Platformatic DB on complex real-life, databases. Here are the fixes he contributed in this release: 

* fix(sql): Already declared route in https://github.com/platformatic/platformatic/pull/548
* fix(sql-openapi): Multiple tables with FKs pointing to same PKs in https://github.com/platformatic/platformatic/pull/565
* fix(sql-openapi): Same FK with different names in https://github.com/platformatic/platformatic/pull/566
* fix(sql-graphql): Enum with special chars in https://github.com/platformatic/platformatic/pull/587

## create-platformatic

Our `create-platformatic` command that we introduced in [Platformatic v0.11.0](https://blog.platformatic.dev/platformatic-v0110-npm-create-platformatic) had quite a bit of testing, and we had a few bugs to fix:

* Ignore `.sqlite` files for `create-platformatic` by [@u5r0](https://github.com/u5r0) in https://github.com/platformatic/platformatic/pull/570
* Manage error if `git` or `whoami` fails in `create-platformatic` by [@marcopiraccini](https://github.com/marcopiraccini) in https://github.com/platformatic/platformatic/pull/581
* Feature: show warning on unsupported node.js version by [@dancastillo](https://github.com/dancastillo) in https://github.com/platformatic/platformatic/pull/577
