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

Some vagueness on /guides/spa #116

Closed
mikemaccana opened this issue Jul 16, 2019 · 2 comments
Closed

Some vagueness on /guides/spa #116

mikemaccana opened this issue Jul 16, 2019 · 2 comments

Comments

@mikemaccana
Copy link
Contributor

This means your single page application and API can share the same domain name, session support and database access without CORS and without 3rd party proxies.

I'm confused by this - I'd have thought that's normally possible on any platform, without any of those things.

Does it mean that the same route can be handled is multiple ways? Eg, an HTTP request from a browser that accepts HTML can go to /bananas, and an HTTP request from a API client that accepts JSON can also go to /bananas (rather than say /api/v1/bananas?

Or does it mean something else?

@brianleroux
Copy link
Member

Yea its confusing af.

Thinking thru some more strategies to make this simpler. Right now if you want to request an asset on S3 it will be served from a different domain which can make browsers sad (if we want to use HTTPS anyhow). The workaround is use the /_static proxy we add to API Gateway or use the the Lambda proxy at the root.

Did a bunch of research today trying to get the S3 bucket proxied from the root but TL;DR you can only do it with the Lambda function. This creates some config and general confusion. Working on an idea to eliminate that!

@tbeseda
Copy link
Member

tbeseda commented Oct 27, 2021

The doc in question here hasn't been online for a while and we're in the process of reorganizing thoughts/docs around SPAs as well. Unfortunately there still isn't a great reference for _static -- it's on my radar and will be part of the outline in #411.
Always good to know about confusing/vague docs, so definitely open new issues if newer docs are not helpful.

@tbeseda tbeseda closed this as completed Oct 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants