I am proposing an enhancement for the setGlobalOptions function in Firebase Functions Gen 2.
The setGlobalOptions function enables setting global configurations for the entire project such as enforceAppCheck. For example:
import { setGlobalOptions } from "firebase-functions/v2";
setGlobalOptions({
enforceAppCheck: true,
});
But I think it would be beneficial to include consumeAppCheckToken and cors options as well.
Adding consumeAppCheckToken will allow developers to fully handle AppCheck at a global level, complementing enforceAppCheck which is already available. Details on consumeAppCheckToken which is currently set at the function level can be found here.
And including cors will provide developers the convenience of managing Cross-Origin Resource Sharing settings across the entire project. Details on cors which is currently set at the function level can be found here.
These enhancements will reduce repetitive individual function configurations, significantly streamlining the development process.
I am proposing an enhancement for the
setGlobalOptions
function in Firebase Functions Gen 2.The
setGlobalOptions
function enables setting global configurations for the entire project such asenforceAppCheck
. For example:But I think it would be beneficial to include
consumeAppCheckToken
andcors
options as well.Adding
consumeAppCheckToken
will allow developers to fully handle AppCheck at a global level, complementingenforceAppCheck
which is already available. Details onconsumeAppCheckToken
which is currently set at the function level can be found here.And including
cors
will provide developers the convenience of managing Cross-Origin Resource Sharing settings across the entire project. Details oncors
which is currently set at the function level can be found here.These enhancements will reduce repetitive individual function configurations, significantly streamlining the development process.
The end result would be something like this:
Thank you for your consideration.