-
Notifications
You must be signed in to change notification settings - Fork 2
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
fix: uncomment NEXT_PUBLIC_URL
and NODE_TLS_REJECT_UNAUTHORIZED
in the generated .env
#73
fix: uncomment NEXT_PUBLIC_URL
and NODE_TLS_REJECT_UNAUTHORIZED
in the generated .env
#73
Conversation
7305e84
to
8a7307a
Compare
NEXT_PUBLIC_URL
by defaultNEXT_PUBLIC_URL
is not commented out in the generated .env
.
NEXT_PUBLIC_URL
is not commented out in the generated .env
.NEXT_PUBLIC_URL
in the generated .env
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should also update NODE_TLS_REJECT_UNAUTHORIZED
so its uncommented + set to 0 in our access function.
NEXT_PUBLIC_URL
in the generated .env
NEXT_PUBLIC_URL
and NODE_TLS_REJECT_UNAUTHORIZED
in the generated .env
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Love it - just need to adjust some of the generated comments (and the matching tests)
What
This PR updates the
.env
file generation logic to ensure thatNEXT_PUBLIC_URL
andNODE_TLS_REJECT_UNAUTHORIZED
are always included as an active (uncommented) entry. It also updates the corresponding test cases to reflect this change.Why
Previously,
NEXT_PUBLIC_URL
andNODE_TLS_REJECT_UNAUTHORIZED
were being commented out when they had a default value. Since this variables are crucial for frontend applications, ensuring it is always uncommented eliminates unnecessary setup issues.Related Issue(s):
How
access-functions.php
: Modified the response ofsnapwp_helper_get_env_variables
to include values to be passed to the reuired variables.Generator.php
: Modified the condition inprepare_variable()
to prevent0
(zero) value from throwing anInvalidArgumentException
.GeneratorTest.php
RestControllerTest.php
Screenshots
Checklist