[V5] Can cors origin accept an async function? #4167
-
I want my client to be able to control which domains access their API. To do this I need to get the I think the method that handles cors origins is For now I'm enabling any origin for |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Hey @rodrigorz! 👋🏻 No, it is not possible to make this method One thing you can do is define a global variable and use it inside the |
Beta Was this translation helpful? Give feedback.
Hey @rodrigorz! 👋🏻
No, it is not possible to make this method
async
.One thing you can do is define a global variable and use it inside the
origin
option.Then on the boot of the application, you can fetch the different origins and update the global variable.