Giter VIP home page Giter VIP logo

Comments (7)

AnandChowdhary avatar AnandChowdhary commented on May 22, 2024

Hi @simoami, thanks for opening the issue! If this is the case, I should handle other boolean environment variables too, like DISABLE_HELMET below it (thought they work right now because !"true" is false, but !"false" is not true), I'll fix it to be more precise.

The TypeScript warning is not an error, so it should compile, but that's something already on my todo and I'm going to fix it ASAP.

from api.

AnandChowdhary avatar AnandChowdhary commented on May 22, 2024

For now, if you remove the environment variable, it should work, because !undefined and !"" are both true, so CORS will be injected. This can be a temporary fix until I deploy an update to @staart/server.

from api.

AnandChowdhary avatar AnandChowdhary commented on May 22, 2024

I've fixed this, but I'll also check the codebase for other environment variables booleans.

from api.

AnandChowdhary avatar AnandChowdhary commented on May 22, 2024

I'll open another issue for the TypeScript warning so we can check on it

from api.

simoami avatar simoami commented on May 22, 2024

from api.

AnandChowdhary avatar AnandChowdhary commented on May 22, 2024

Maybe something to do with the fact that it was in @staart/api before, and is now in a separate @staart/server package and the .env was directly used with process.env.VAR instead of from the config.ts file which had smart fallbacks.

If anything similar doesn't work again, I'll reopen this issue, but we should be good to go for now.

from api.

simoami avatar simoami commented on May 22, 2024

Ah got it. That must be it then. Thanks for fixing

from api.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.