Vincent Bernat
ee6e197e8e
chore: switch to math/rand/v2
2025-10-26 12:14:20 +01:00
Vincent Bernat
3a6ba16a2e
console/authentication: template logout and avatar URLs if not provided
CI / 🤖 Check dependabot status (push) Has been cancelled
CI / 🐧 Test on Linux (${{ github.ref_type == 'tag' }}, misc) (push) Has been cancelled
CI / 🐧 Test on Linux (coverage) (push) Has been cancelled
CI / 🐧 Test on Linux (regular) (push) Has been cancelled
CI / ❄️ Build on Nix (push) Has been cancelled
CI / 🍏 Build and test on macOS (push) Has been cancelled
CI / 🧪 End-to-end testing (push) Has been cancelled
CI / 🔍 Upload code coverage (push) Has been cancelled
CI / 🔬 Test only Go (push) Has been cancelled
CI / 🔬 Test only JS (${{ needs.dependabot.outputs.package-ecosystem }}, 20) (push) Has been cancelled
CI / 🔬 Test only JS (${{ needs.dependabot.outputs.package-ecosystem }}, 22) (push) Has been cancelled
CI / 🔬 Test only JS (${{ needs.dependabot.outputs.package-ecosystem }}, 24) (push) Has been cancelled
CI / ⚖️ Check licenses (push) Has been cancelled
CI / 🐋 Build Docker images (push) Has been cancelled
CI / 🐋 Tag Docker images (push) Has been cancelled
CI / 🚀 Publish release (push) Has been cancelled
2025-10-19 15:54:07 +02:00
Vincent Bernat
16a864d255
console: add an header to get avatar URL
...
And use it if not empty.
2025-10-19 15:41:33 +02:00
Vincent Bernat
d59562d348
docker: another example to enable SSO
2025-10-19 12:57:56 +02:00
Vincent Bernat
b1d6382585
common/embed: replace all go:embed use by an embedded archive
...
Some of the files were quite big:
- asns.csv ~ 3 MB
- index.js ~ 1.5 MB
- *.svg ~ 2 MB
Use a ZIP archive to put them all and embed it. This reduce the binary
size from 89 MB to 82 MB. 🤯
This also pulls some code modernization (use of http.ServeFileFS).
2025-09-03 00:00:05 +02:00
Vincent Bernat
18beb310ee
chore: replace interface{} with any
2025-07-29 07:42:49 +02:00
Vincent Bernat
a449736a62
build: use Go 1.22 range over ints
...
Done with:
```
git grep -l 'for.*:= 0.*++' \
| xargs sed -i -E 's/for (.*) := 0; \1 < (.*); \1\+\+/for \1 := range \2/'
```
And a few manual fixes due to unused variables. There is something fishy
in BMP rib test. Add a comment about that. This is not equivalent (as
with range, random is evaluated once, while in the original loop, it is
evaluated at each iteration). I believe the intent was to behave like
with range.
2024-08-14 10:11:35 +02:00
Vincent Bernat
62521e629d
common/http: rename to common/httpserver
...
This is a preparation to introduce an httpclient common package. And it
makes it easier to use http from the standard library.
2023-05-28 09:08:29 +02:00
Vincent Bernat
3e3bcbdada
http: use a method to get local address
...
And limit its export to testing.
2022-08-21 08:20:14 +02:00
Vincent Bernat
78fb01c223
chore: fix some small issues detected by golangci-lint
...
But not using it as some linters are either plain incorrect (the one
suggesting to not use nil for `c.t.Context()`) or just
debatable (checking for err value is a good practice, but there are
good reasons to opt out in some cases).
2022-08-10 17:44:32 +02:00
Vincent Bernat
61c8143fe8
build: fix linting issues introduced by latest revive release
2022-08-07 23:54:24 +02:00
Vincent Bernat
8be1bca4fd
license: AGPL-3.0-only
...
```
git ls-files \*.js \*.go \
| xargs sed -i '1i // SPDX-FileCopyrightText: 2022 Free Mobile\n// SPDX-License-Identifier: AGPL-3.0-only\n'
git ls-files \*.vue \
| xargs sed -i '1i <!-- SPDX-FileCopyrightText: 2022 Free Mobile -->\n<!-- SPDX-License-Identifier: AGPL-3.0-only -->\n'
```
2022-06-29 11:42:28 +02:00
Vincent Bernat
b65d78ab1b
console: turn authentication into a proper component
2022-06-09 19:55:57 +02:00
Vincent Bernat
f37d98000b
console: use __default as the default user to avoid clash with real ones
2022-06-01 14:55:40 +02:00
Vincent Bernat
78f628b6db
console: use an ETag for avatars
...
The Remote-User header is unlikely to be visible from the browser.
2022-06-01 11:58:00 +02:00
Vincent Bernat
f5252ce077
console: rework a bit user management
...
Notably, HTTP headers are configurable and a provider is used for the
frontend side.
2022-05-31 17:03:00 +02:00