Skip to content

Commit

Permalink
Added basic auth for daemon
Browse files Browse the repository at this point in the history
  • Loading branch information
ralsina committed Jun 30, 2024
1 parent adb8ce2 commit 35fa820
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 5 deletions.
3 changes: 2 additions & 1 deletion .ameba.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# This configuration file was generated by `ameba --gen-config`
# on 2024-06-30 03:32:11 UTC using Ameba version 1.6.1.
# on 2024-06-30 14:55:35 UTC using Ameba version 1.6.1.
# The point is for the user to remove these configuration records
# one by one as the reported problems are removed from the code base.

Expand All @@ -10,6 +10,7 @@ Documentation/DocumentationAdmonition:
Timezone: UTC
Excluded:
- src/faaso.cr
- src/daemon.cr
- src/funko.cr
- spec/faaso_spec.cr
Admonitions:
Expand Down
4 changes: 4 additions & 0 deletions shard.lock
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ shards:
git: https://github.com/kemalcr/kemal.git
version: 1.5.0

kemal-basic-auth:
git: https://github.com/kemalcr/kemal-basic-auth.git
version: 1.0.0

radix:
git: https://github.com/luislavena/radix.git
version: 0.4.1
Expand Down
9 changes: 5 additions & 4 deletions shard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,19 @@ targets:
faaso-daemon:
main: src/daemon.cr

crystal: '>= 1.12.2'
crystal: ">= 1.12.2"

license: MIT


dependencies:
docr:
github: ralsina/docr
branch: add_exposed_ports
commander:
github: mrrooijen/commander
kemal:
github: kemalcr/kemal
github: kemalcr/kemal
kemal-basic-auth:
github: kemalcr/kemal-basic-auth
crinja:
github: straight-shoota/crinja
github: straight-shoota/crinja
4 changes: 4 additions & 0 deletions src/daemon.cr
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
require "docr"
require "kemal"
require "kemal-basic-auth"

# FIXME: make configurable
basic_auth "admin", "admin"

current_config = ""

Expand Down

0 comments on commit 35fa820

Please sign in to comment.