-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
QUIRREL_BASE_URL environment variable not working in development #1028
Comments
Judging from the code you sent, it looks like you should be using |
Nope I've tried every variation of https:// vs http://, port 3000 vs 3001. The problem seems to be that Quirrel is ignoring my |
The QUIRREL_BASE_URL variable is picked up by the Quirrel npm library you're importing in your Blitz app. Can you check if other environment variables from that file are being picked up by Blitz? |
Aside from that, could you elaborate on why you're trying to guard Quirrel behind an SSL proxy locally? Would love to learn more about that. |
Yeah all other environment variables are working and if I console.log(process.env.QUIRREL_BASE_URL) on the server it prints the correct value. As for the SSL, I actually don't even remember why I'm using a proxy. If I start my application without the proxy, with just Regardless, I still thought this was worth opening the issue because it does seem Quirrel is ignoring the environment variable, and if that's the case I'm concerned what will happen in production when I try to set the variable. |
When you write "the application seems to still use the default" in the issue, what is "the application" referring to, Quirrel or your Blitz application? |
If it's referring to Quirrel, I think I have an idea of what's causing what you're seeing, and it checks out that you're seeing the Dev UI call the local quirrel server via HTTP and not HTTPS. In local dev, I consider that very acceptable. Can you elaborate on why that's a problem for your usecase? |
I mean Quirrel. I've updated the description for clarity. I don't think HTTPS is the issue. Even if I stop using the proxy, Quirrel still won't call any url other than http://localhost:3000. For example, if I set Like I said, it's not necessarily a problem in development because I can just not use proxies or port forwarding. But this does seem to go against the expected behavior of Quirrel. And I'm concerned that if the environment variable doesn't work in development, then it won't in production, which would be a problem. |
I think the problem is that in your |
perfect, that worked. Much thanks! I'll mark this as closed. |
Bug Report
Current Behavior
I'm using local-ssl-proxy for development which means my base url is https://localhost:3000. But no matter what I set QUIRREL_BASE_URL to in my .env files, Quirrel seems to still use the default (insecure) http://localhost:3000 as the base url. As a result, my queues/events are not working.
Input Code
.env
package.json
Expected behavior/code
Quirrel should be using the environment variable I've set for the base url.
Environment
Possible Solution
Additional context/Screenshots

In the development UI, on the network tab it is showing the wrong (default) base URL being called.
The text was updated successfully, but these errors were encountered: