summaryrefslogtreecommitdiffstats
path: root/app/server.go
Commit message (Collapse)AuthorAgeFilesLines
* redirect, vs. proxy, 80->443 without LE enabled (#9020)Jesse Hallam2018-06-291-8/+16
| | | The code incorrectly got refactored to proxy instead of forward, deviating from the behaviour when LE is enabled.
* MM-10370: serve subpath (#8968)Jesse Hallam2018-06-211-5/+12
| | | | | | | | | | | | | | | | | | | | | | | * factor out GetSubpathFromConfig * mv web/subpath.go to utils/subpath.go * serve up web, api and ws on /subpath if configured * pass config to utils.RenderWeb(App)?Error This allows the methods to extract the configured subpath and redirect to the appropriate `/subpath/error` handler. * ensure GetSubpathFromConfig returns trailing slashes deterministically * fix error 404 handling * redirect /subpath to /subpath/ This is necessary for the static handler to match, otherwise none of the registered routes find anything. This also makes it no longer necessary to add trailing slashes in the root router.
* Structured logging (#8673)Christopher Speller2018-04-271-12/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Implementing structured logging * Changes to en.json to allow refactor to run. * Fixing global logger * Structured logger initalization. * Add caller. * Do some log redirection. * Auto refactor * Cleaning up l4g reference and removing dependancy. * Removing junk. * Copyright headers. * Fixing tests * Revert "Changes to en.json to allow refactor to run." This reverts commit fd8249e99bcad0231e6ea65cd77c32aae9a54026. * Fixing some auto refactor strangeness and typo. * Making keys more human readable.
* improve error handling around invalid Forward80To443 settings (#8496)Jesse Hallam2018-03-231-1/+6
| | | | * If Forward80To443 is true, but not configured to listen on 443, fail to start the server with an error message. * If Forward80To443 is false and LetsEncrypt is true, fail to start the server with an error message.
* general cleanup (#8387)Chris2018-03-071-47/+0
|
* Fix forward 80 to 443 to not bind on all interfaces. (#8360)Christopher Speller2018-02-231-12/+17
|
* Abort on critical error during server startup (#8204)Pierre de La Morinerie2018-02-071-5/+7
| | | | | | | | | | | | | | | | | Only a handful of critical errors are present in the codebase. They all occur during server startup (in `app.StartServer()`). Currently, when one of these critical error occurs, it is simpled mentionned in the logs – then the error is discarded, and the app attempts to continue the execution (and probably fails pretty quickly in a weird way). Rather than continuing operations in an unknow state, these errors should trigger a clean exit. This commit rewrites critical startup errors to be correctly propagated, logged, and then terminate the command execution. Additionnaly, it makes the server return a proper error code to the shell.
* handle RateLimiter initialization errors (#8199)Pierre de La Morinerie2018-02-051-2/+7
| | | | | Previously, an error occuring in NewRateLimiter would return a nil reference – which would be de-referenced just after, making the server crash.
* User based rate limiting (#8152)Christopher Speller2018-01-311-30/+21
|
* Moving to golang.org/x/crypto/acme/autocert for Let's Encrypt functionality. ↵Christopher Speller2018-01-301-13/+28
| | | | (#8165)
* origin checker refactor (#7889)Chris2017-11-221-2/+9
|
* add error message to forwarding log error (#7857)Chris2017-11-201-1/+1
|
* Remove more global refs / state (#7723)Chris2017-10-261-21/+3
| | | | | | | | | | * remove more global refs / state * fix job enterprise initialization * fix api4 test compilation * saml api endpoints fix
* Reduce utils.Cfg references (#7650)Chris2017-10-181-12/+12
| | | | | | | | | | | | * app.UpdateConfig method * test fix * another test fix * the config override option as-was is just error prone, remove it for now * derp
* Fix webconn shutdown race (#7631)Chris2017-10-161-5/+20
| | | | | | | | | | * fix webconn shutdown race * make sure writePump returns promptly if readPump returns first * fix app shutdown race * minor improvement
* parallel tests (#7629)Chris2017-10-161-19/+63
|
* Add back consumeAndClose functionality. (#7608)Christopher Speller2017-10-121-0/+10
| | | | | | | * consume bodies for action button integrations, webrtc gateway, oauth endpoint * Fixing a couple more places, switching to io.Copy to ioutil.Discard, adding a comment to help prevent future performance regressions
* Miscellaneous app cleanup (#7594)Chris2017-10-091-11/+8
| | | | | | | | | | | | * app cleanup * whoops, forgot a file * some minor cleanup * longer container deadline * defensive checks
* store/sqlstore cleanup and postgres tests (#7595)Chris2017-10-091-1/+1
| | | | | | | | | | * sqlstore cleanup / postgres tests * remove stopped containers * cmd/platform compile fix * remove test-postgres target from makefile
* Goroutine wranglin (#7556)Chris2017-10-031-15/+0
| | | | | | * goroutine wranglin * synchronize WebConn.WritePump
* Don't use global app for api / api4 tests (#7528)Chris2017-10-021-0/+2
| | | | | | | | | | | | | | * don't use global app for api / api4 tests * put sleep back. we're gonna have to do some goroutine wrangling * fix oauth test config assumptions * jobs package, i'm comin' for you next * app test fix * try increasing sleep a little
* remove remaining Global() calls (outside of tests) (#7521)Chris2017-09-281-1/+1
|
* Move sql store code into store/sqlstore package (#7502)Chris2017-09-251-1/+2
| | | | | | | | | | * move sql store code into store/sqlstore package * move non-sql constants back up to store * fix api test * derp
* remove more global refs (#7480)Chris2017-09-211-1/+1
|
* PLT-7407: Back-end plugins (#7409)Chris2017-09-111-32/+2
| | | | | | | | | | | | * tie back-end plugins together * fix comment typo * add tests and a bit of polish * tests and polish * add test, don't let backend executable paths escape the plugin directory
* Renaming repoChristopher Speller2017-09-061-4/+4
|
* app type transition (#7167)Chris2017-09-061-19/+17
|
* Temporarily place plugins into E20 (#7370)Joram Wilander2017-09-051-1/+1
|
* Implement experimental REST API endpoints for plugins (#7279)Joram Wilander2017-09-011-0/+32
| | | | | | | | | | | | | | | | | | * Implement experimental REST API endpoints for plugins * Updates per feedback and rebase * Update tests * Further updates * Update extraction of plugins * Use OS temp dir for plugins instead of search path * Fail extraction on paths that attempt to traverse upward * Update pluginenv ActivePlugins()
* set to default value with config is missing (#7320)Saturnino Abril2017-08-301-4/+4
|
* Tweak WebSocket header-processing (#6929)Chris2017-07-131-3/+2
| | | | | | * fix * consolidate code
* Stage 1 of caching layer. Framework (#6693)Christopher Speller2017-06-271-1/+1
|
* Writing message to our logs when system panics and recovers (#6458)Corey Hulen2017-05-241-4/+13
|
* PLT-5860 Updated copyright date (#6058)Harrison Healey2017-04-121-1/+1
| | | | | | | | | | | | * PLT-5860 Updated copyright date in about modal * PLT-5860 Updated copyright notice in JSX files * PLT-5860 Updated copyright notice in go files * Fixed misc copyright dates * Fixed component snapshots
* PLT-4938 Add app package and move logic over from api package (#4931)Joram Wilander2017-01-131-0/+217
* Add app package and move logic over from api package * Change app package functions to return errors * Move non-api tests into app package * Fix merge