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(firebase): use correct key when importing firebase httpsOptions
#1663
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1663 +/- ##
=======================================
Coverage 77.79% 77.79%
=======================================
Files 76 76
Lines 7836 7836
Branches 805 805
=======================================
Hits 6096 6096
Misses 1738 1738
Partials 2 2 |
@posva do we need both setGlobalOptions and the options being passed there ? |
@Hebilicious I think #1657 is a workaround and would no longer be required. This if statement pulls from |
I donβt think both are needed but since it was in docs I supposed the prΓ©fΓ¨res way just changed and using the global options changed |
Hi everyone! I have confirmed that the code modified in this PR works as expected with Alternatively, I have also confirmed that setting all options in setGlobalOptions(
firebaseConfig.httpsOptions
);
export const __firebaseServerFunctionName__ = onRequest(
{
// Must be set to public to allow all public requests by default
invoker: "public",
},
toNodeListener(nitroApp.h3App)
); There is no need to have both, so choose one or the other. |
httpsOptions
httpsOptions
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.
Thanks β€οΈ I appreciate if you can confirm this PR using edge release channel if had a chance.
@pi0 I'm on the edge release const nitroApp = createNitroApp();
const useNitroApp = () => nitroApp;
const firebaseConfig = useAppConfig().nitro.firebase;
const server = onRequest(
{
// Must be set to public to allow all public requests by default
invoker: "public",
...firebaseConfig.httpOptions
},
toNodeListener(nitroApp.h3App)
); The Nitro config for this project is: nitro: {
preset: "firebase",
firebase: {
gen: 2,
nodeVersion: "18",
httpsOptions: {
region: "us-east1",
},
},
}, Any ideas on what to check? |
@luc122c Are you using |
@pi0 , no it's in the Edit: It works in |
π Linked issue
fix #1655
#1657
#1556
#1555
β Type of change
π Description
The correct key is
httpsOptions
, however,httpOptions
was being pulled in. I searched forhttpOptions
and this appeared to be the only remaining instance. I believe this is the root fix for #1655π Checklist