Follow

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

Platformatic v0.13.0 - Fixing CORS configuration and other improvements

Matteo Collina's photo
Matteo Collina
·Jan 13, 2023·

2 min read

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: github.com/platformatic/platformatic/releas...

Fixed Cross-Origin Resource Sharing Protection configuration

In #562, Manuel Spigolon found a fascinating bug: it was impossible to specify a correct 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 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 github.com/platformatic/platformatic/pull/590.

The new CORS configuration can be specified as follows:

{
    "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 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:

create-platformatic

Our create-platformatic command that we introduced in Platformatic v0.11.0 had quite a bit of testing, and we had a few bugs to fix:

 
Share this