Skip to content
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

[Feature]: Support OPTIONS method request for server on ModernJs #6148

Open
thuutri2710 opened this issue Aug 30, 2024 · 1 comment
Open
Assignees

Comments

@thuutri2710
Copy link

What problem does this feature solve?

This helps us to be able handle the OPTIONS (method) request. When customizing server on ModernJs, I want to expose some APIs. Because these APIs are called on a different domain so browsers will send the OPTIONS request automatically. However, currently, ModernJs server can't catch the OPTIONS request so it throws the CORS error.

What does the proposed API look like?

In the file packages/server/core/src/serverBase.ts.

I expect we can add the getter for options. Because it's duplicated with the name of property options, so I suggest that we'll use serverOptions for that property and have method getOptions to get its value

@zllkjc
Copy link
Member

zllkjc commented Sep 19, 2024

Let me try this issue~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants