1
0
mirror of https://github.com/jhillyerd/inbucket.git synced 2025-12-17 17:47:03 +00:00
Commit Graph

27 Commits

Author SHA1 Message Date
James Hillyerd
33784cbb94 chore: more small lint/perf fixes (#493)
Signed-off-by: James Hillyerd <james@hillyerd.com>
2024-02-16 16:53:50 -08:00
James Hillyerd
baa2dbd3a1 chore: fix many cosmetic linter warnings (#486)
* fix whitespace warnings

Signed-off-by: James Hillyerd <james@hillyerd.com>

* fix a number of typos

Signed-off-by: James Hillyerd <james@hillyerd.com>

* fix many cosmetic linter warnings

Signed-off-by: James Hillyerd <james@hillyerd.com>

---------

Signed-off-by: James Hillyerd <james@hillyerd.com>
2024-02-15 18:02:26 -08:00
James Hillyerd
535438342e server: resolve linter errors (#433)
Signed-off-by: James Hillyerd <james@hillyerd.com>
2023-11-13 11:34:05 -08:00
James Hillyerd
63e47a4e74 web: Redirect base path prefix to prefix/ (#397)
Signed-off-by: James Hillyerd <james@hillyerd.com>
2023-09-13 12:18:08 -07:00
James Hillyerd
9836c0ffbb go: update mod and imports to correctly reflect major version (#388) 2023-09-09 12:36:21 -07:00
James Hillyerd
eae4926b23 Dependency injection improvements (#288)
Refactor server life-cycle into it's own file, make service startup and monitoring more consistent and testable.

* Extract services creation in preparation for DI
* pop3: rename New to NewServer
* lifecycle: Add fatal error Notify()
* web: Introduce Server struct w/ Notify()
* Extract Start in lifecycle
* Add Start() to Hub
* RetentionScanner startup consistent with other svcs
* Remove global shutdown channel
* Implement a readiness notification system
2022-08-13 13:22:34 -07:00
Stuart Skelton
3c5960aba0 Avoid potential click jacking (#190) 2020-11-19 08:16:01 -08:00
James Hillyerd
5a0c4778cb Set base path in index.html (#172)
- Create a new index-dev.html for webpack live server
- Update Go+index.html to set <base href>
- Fixes #171
2020-08-29 19:06:21 -07:00
James Hillyerd
289b38f016 Add configurable base path for reverse proxy use (#169)
* ui: Refactor routing functions into Router record
* ui: Store base URI in AppConfig
* ui: Use basePath in Router functions
* backend: Add Web.BasePath config option and update routes
* Tweaks to get SPA to bootstrap basePath configured
* ui: basePath support for apis/serve
* ui: basePath support for message monitor
* web: Redirect requests to / when basePath configured
* doc: add basepath to config.md
* Closes #107
2020-08-09 15:53:15 -07:00
James Hillyerd
e4c48a0705 go code: rename to github.com/inbucket/inbucket 2019-02-24 09:43:10 -08:00
James Hillyerd
c57260349b web + ui: Pass init cookie from server to client 2018-12-31 15:10:05 -08:00
James Hillyerd
77ea66e0e6 web: Remove unused helpers 2018-12-15 09:51:37 -08:00
James Hillyerd
89886843bd web: Remove template related code 2018-12-15 09:20:57 -08:00
James Hillyerd
4894244d5c webui: Remove sessions & securecookie 2018-12-15 08:35:00 -08:00
James Hillyerd
e70900dd1a web: Implement SPA compatible routing 2018-11-17 14:38:04 -08:00
James Hillyerd
523c04a522 Logging improvements, handler extraction.
- rest: improve error logging.
- web: extract handlers/middleware into their own file.
- web: log all requests, not just ones hitting our handlers.
- test: improve integration test logging format.
2018-11-12 20:38:00 -08:00
James Hillyerd
dd14fb9989 ui: Much elm work, such wow
- ui: Fix favicon
- webui: Changes to support serving Elm UI
- Static files now served from `/` mount point.
- Old UI handlers moved to `/serve` mount point, some will still be
  needed by the Elm UI; safe HTML and attachments for example.
- Update dev-start.sh for new UI, with tip on how to build it.
- ui: Detect browser host:port for websocket URL,
- webui: Remove unused mailbox handlers, rename routes
- Many routes not needed by Elm UI.
- `/serve/mailbox/*` becomes `/serve/m/*`.
- webui: Impl custom JSON message API for web UI,
- ui: Refactor Mailbox view functions,
- ui: Add body tabs for safe HTML and plain text,
- webui: Format plain text for new UI,
- ui: List attachments with view & download links,
2018-11-12 20:34:51 -08:00
James Hillyerd
30e3892cb0 webui, rest: Render UTF-8 addresses correctly, fixes #117 2018-10-22 18:29:03 -07:00
James Hillyerd
98745b3bb9 web: Optionally mount /debug/pprof for #120
- web: eliminate use of http.DefaultServeMux
2018-10-20 16:16:09 -07:00
James Hillyerd
064549f576 policy: Implement store domain policy for #51
- Update docs, change log, status.html
2018-04-01 19:59:04 -07:00
James Hillyerd
e2ba10c8ca Replace pkg/log with zerolog for normal logging #90 2018-03-27 20:26:06 -07:00
James Hillyerd
04bb842549 config: Combine TemplateDir and PublicDir into UIDir
- Define static names for `templates` and `static`
2018-03-25 11:55:23 -07:00
James Hillyerd
845cbedc0d config: Replace robfig with envconfig for #86
- Initial envconfig system is working, not bulletproof.
- Added sane defaults for required parameters.
2018-03-21 22:50:21 -07:00
James Hillyerd
219862797e web: remove DataStore from Context and controllers for #81 2018-03-12 20:49:06 -07:00
James Hillyerd
10bc07a18e message: Implement service layer, stubs for #81
I've made some effort to wire the manager into the controllers, but
tests are currently failing.
2018-03-12 20:21:59 -07:00
James Hillyerd
a58dfc5e4f storage: finish renaming storage packages for #79 #69
- storage: rename DataStore to Store
- file: rename types to appease linter
2018-03-10 14:00:21 -08:00
James Hillyerd
f8c30a678a Reorganize packages, closes #79
- All packages go into either cmd or pkg directories
- Most packages renamed
- Server packages moved into pkg/server
- sanitize moved into webui, as that's the only place it's used
- filestore moved into pkg/storage/file
- Makefile updated, and PKG variable use fixed
2018-03-10 12:04:13 -08:00