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

Encourage hosting internal apis on same origin #4

Open
peterboyer opened this issue Jan 5, 2022 · 0 comments
Open

Encourage hosting internal apis on same origin #4

peterboyer opened this issue Jan 5, 2022 · 0 comments

Comments

@peterboyer
Copy link
Owner

Although hosting your api on api.yourcompany.com may look cool, it forces your api requests to issue an OPTIONS request FIRST to check if CORS is allowed from yourcompany.com to api.yourcompany.com -- you can reduce the number of requests and overhead by half if you opt to expose your api on the same origin using a route like /api instead.

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

No branches or pull requests

1 participant