Skip to content
This repository has been archived by the owner on Sep 23, 2021. It is now read-only.

Configure api proxying, and fix session support on development server #40

Closed
scottbedard opened this issue Sep 16, 2018 · 1 comment
Closed
Labels
3.x This issue is part of the vue-cli 3 rewrite bug Something isn't working properly

Comments

@scottbedard
Copy link
Owner

scottbedard commented Sep 16, 2018

Currently, sessions do not work on the development server. This should be the last fix necessary before tagging a release candidate.

@scottbedard scottbedard added bug Something isn't working properly 3.x This issue is part of the vue-cli 3 rewrite labels Sep 16, 2018
@scottbedard
Copy link
Owner Author

scottbedard commented Sep 16, 2018

Just thinking out loud here, the fix for this can actually simplify several issues at once. If we write the index.htm file to disk, we should be able to use the application url as the entry point instead of localhost:8080. Doing this would allow sessions to persist since the host would remain the same, and we could do away with any api proxying. We also should get proper October error screens without any extra work. And one last bonus, changes to index.htm would be visible with just a page refresh, rather than after a build and restarting the dev server. The only real downside to doing this is it might make it trickier to deploy because we're no longer serving the dev entry point from memory. We'd actually be overwriting the production entry point each time things change. This shouldn't be too much of a problem though, because built files should not be kept in source control anyway.

Update: Even more wins, we could entirely do away with the dev entry point since the dev/production entry will be the same. This would even clean up our typescript integration, since we no longer need to maintain two different entry points depending on the presence of that plugin.

Update 2: The wins just keep piling up with this new approach, we can get rid of the cors logic our index.htm file because requests are no longer cross-origin. In addition to not having to mess with cors, this means the site will even work locally in production mode now.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
3.x This issue is part of the vue-cli 3 rewrite bug Something isn't working properly
Projects
None yet
Development

No branches or pull requests

1 participant