Commit Graph

14 Commits

Author SHA1 Message Date
f6a8a5f7be fix(site): prevent ExtractAPIKey from dirtying the HTML output (#8450)
If `httpmw.ExtractAPIKey` fails when we are rendering an HTML page, the
HTML output will be dirtied with the error repsonse and the HTTP status
will also be wrong.

The use of this function in the `renderHTMLWithState` is additive, and
failure means we simply can't embed static data. To fix this, we can
simply pass a `http.ResponseWriter` that is no-op.

Fixes #8351
2023-07-12 15:38:30 +03:00
9df9ad4503 feat: embed common client requests into the template html (#8076)
This should reduce the number of API requests a client makes
when loading the dashboard dramatically!
2023-06-18 13:57:27 -05:00
07608fc3fb chore: fix proxy 404 page (#7421)
* chore: fix proxy 404 page

---------

Co-authored-by: Kyle Carberry <kyle@coder.com>
2023-05-05 13:53:19 -05:00
b19d644162 feat: add etag to slim binaries endpoint (#5750) 2023-01-18 04:38:08 +10:00
43b61ce33c chore: support underscores in agent bin filenames (#5496) 2022-12-21 21:06:38 +00:00
d165d76338 feat: static error page in applications handlers (#4299) 2022-10-05 02:30:55 +10:00
b0fe9bcdd1 chore: Upgrade to Go 1.19 (#3617)
This is required as part of #3505.
2022-08-21 22:32:53 +00:00
19fcf60864 ci: add typo detection (#3327)
And fix them.
2022-08-01 09:29:52 -04:00
4730c589fe chore: Use standardized test timeouts and delays (#3291) 2022-08-01 15:45:05 +03:00
ef7d357e19 fix: Move timeout ctx closer to use in tests, increase timeout (#3109)
Some contexts were moved closer to use so that test setup doesn't affect
timeout. And timeout was increased for some others to avoid flakyness
due to slow test runners.
2022-07-22 17:42:09 +03:00
69b7eed7ed feat: Check decompressed coder-slim binaries via SHA1 (#2556) 2022-06-22 21:33:23 +03:00
e2785ada5e feat: Compress and extract slim binaries with zstd (#2533)
Fixes #2202

Co-authored-by: Dean Sheather <dean@deansheather.com>
2022-06-21 19:53:36 +03:00
013f028e55 feat: Add workspace application support (#1773)
* feat: Add app support

This adds apps as a property to a workspace agent.

The resource is added to the Terraform provider here:
https://github.com/coder/terraform-provider-coder/pull/17

Apps will be opened in the dashboard or via the CLI
with `coder open <name>`. If `command` is specified, a
terminal will appear locally and in the web. If `target`
is specified, the browser will open to an exposed instance
of that target.

* Compare fields in apps test

* Update Terraform provider to use relative path

* Add some basic structure for routing

* chore: Remove interface from coderd and lift API surface

Abstracting coderd into an interface added misdirection because
the interface was never intended to be fulfilled outside of a single
implementation.

This lifts the abstraction, and attaches all handlers to a root struct
named `*coderd.API`.

* Add basic proxy logic

* Add proxying based on path

* Add app proxying for wildcards

* Add wsconncache

* fix: Race when writing to a closed pipe

This is such an intermittent race it's difficult to track,
but regardless this is an improvement to the code.

* fix: Race when writing to a closed pipe

This is such an intermittent race it's difficult to track,
but regardless this is an improvement to the code.

* fix: Race when writing to a closed pipe

This is such an intermittent race it's difficult to track,
but regardless this is an improvement to the code.

* fix: Race when writing to a closed pipe

This is such an intermittent race it's difficult to track,
but regardless this is an improvement to the code.

* Add workspace route proxying endpoint

- Makes the workspace conn cache concurrency-safe
- Reduces unnecessary open checks in `peer.Channel`
- Fixes the use of a temporary context when dialing a workspace agent

* Add embed errors

* chore: Refactor site to improve testing

It was difficult to develop this package due to the
embed build tag being mandatory on the tests. The logic
to test doesn't require any embedded files.

* Add test for error handler

* Remove unused access url

* Add RBAC tests

* Fix dial agent syntax

* Fix linting errors

* Fix gen

* Fix icon required

* Adjust migration number

* Fix proxy error status code

* Fix empty db lookup
2022-06-04 15:13:37 -05:00
61aacff444 chore: Refactor site to improve testing (#2014)
It was difficult to develop this package due to the
embed build tag being mandatory on the tests. The logic
to test doesn't require any embedded files.
2022-06-03 04:27:21 +00:00