env variable CORS_ALLOW_ORIGIN with simple vs double dollar sign

30 Views Asked by At

In the .env file I have to set the variable CORS_ALLOW_ORIGIN at ^https?://(.*)(:[0-9]+)?$$, with the double dollars sign. Every other dev in the team seems to be fine with the single $ at the end.

I can not figure the difference.

I am under Ubuntu, the project is based on API-Platform (symfony)

My solution for now, is to "git stash" before changing branch, and git stash apply after.

1

There are 1 best solutions below

0
user2342558 On

The double dollar sign $$ is incorrectly treathed as escape char.

Try to use this instead: ^https?://(.*)(:[0-9]+)?\$