-
Notifications
You must be signed in to change notification settings - Fork 30
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
Remove subdomain routing for the API service #116
Conversation
I have reservations about allowing access to the API routes from any domain. They are restricted for a reason. Would the appropriate solution not be to just specify the internal subdomain as well as the public one? |
Keep in mind that "allowed from any domain" doesn't mean that any domain will be able to use this - it will still only accessible through the correct host routing in the infra which will only allow the external domain and the internal domain The service is not responsible for restricting the domains that can access it - that's the infra's job. In this case, the subdomain routing is only so the service can tell the difference between the different domains |
It's the service's job to restrict this when the service is split into multiple sub-services like ours, though. That's why we have subdomain routing to begin with, since the account server itself houses multiple services which are only accessible at specific domains Right now the It also feels a bit hacky, for lack of a better word? To organize everything neatly with subdomain routing, but for the account API to just go "assume literally anything else is for the account API"? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great, thank you! Just a few nits tbh
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Changes:
cross-env
which allows setting of environment variables on all platformscopyfiles
to copy the static assets. I've used the following command to replace all the copy scripts:copyfiles -e \"src/**/*.ts\" -u 1 \"src/**/*\" dist
src/**/*
to thedist
folder including the assets, views and timezones.ts
files are excluded-u 1
is included so the files aren't copied todist/src
which is the default behaviour