mirror of
https://github.com/nmasur/dotfiles
synced 2025-04-24 13:52:25 +00:00
Compare commits
2 Commits
d337ffff51
...
6815af21dc
Author | SHA1 | Date | |
---|---|---|---|
|
6815af21dc | ||
|
3269d5e247 |
@ -50,8 +50,7 @@ in {
|
|||||||
}];
|
}];
|
||||||
|
|
||||||
# Tell Caddy to use Cloudflare DNS for ACME challenge validation
|
# Tell Caddy to use Cloudflare DNS for ACME challenge validation
|
||||||
services.caddy.package =
|
services.caddy.package = (pkgs.callPackage ../../../overlays/caddy.nix {
|
||||||
(pkgs.callPackage ../../../overlays/custom-caddy.nix {
|
|
||||||
plugins = [ "github.com/caddy-dns/cloudflare" ];
|
plugins = [ "github.com/caddy-dns/cloudflare" ];
|
||||||
# vendorSha256 = "sha256-K9HPZnr+hMcK5aEd1H4gEg6PXAaNrNWFvaHYm5m62JY=";
|
# vendorSha256 = "sha256-K9HPZnr+hMcK5aEd1H4gEg6PXAaNrNWFvaHYm5m62JY=";
|
||||||
});
|
});
|
||||||
|
@ -1,12 +1,13 @@
|
|||||||
{ lib, buildGo118Module, fetchFromGitHub, plugins ? [ ] }:
|
{ lib, buildGo118Module, fetchFromGitHub, plugins ? [ ] }:
|
||||||
let
|
let
|
||||||
imports = lib.flip lib.concatMapStrings plugins (pkg: " _ \"${pkg}\"\n");
|
goImports = lib.flip lib.concatMapStrings plugins (pkg: " _ \"${pkg}\"\n");
|
||||||
|
goGets = lib.flip lib.concatMapStrings plugins (pkg: "go get ${pkg}\n ");
|
||||||
main = ''
|
main = ''
|
||||||
package main
|
package main
|
||||||
import (
|
import (
|
||||||
caddycmd "github.com/caddyserver/caddy/v2/cmd"
|
caddycmd "github.com/caddyserver/caddy/v2/cmd"
|
||||||
_ "github.com/caddyserver/caddy/v2/modules/standard"
|
_ "github.com/caddyserver/caddy/v2/modules/standard"
|
||||||
${imports}
|
${goImports}
|
||||||
)
|
)
|
||||||
func main() {
|
func main() {
|
||||||
caddycmd.Main()
|
caddycmd.Main()
|
||||||
@ -31,7 +32,7 @@ in buildGo118Module rec {
|
|||||||
overrideModAttrs = (_: {
|
overrideModAttrs = (_: {
|
||||||
preBuild = ''
|
preBuild = ''
|
||||||
echo '${main}' > cmd/caddy/main.go
|
echo '${main}' > cmd/caddy/main.go
|
||||||
go get github.com/caddy-dns/cloudflare
|
${goGets}
|
||||||
'';
|
'';
|
||||||
postInstall = "cp go.sum go.mod $out/ && ls $out/";
|
postInstall = "cp go.sum go.mod $out/ && ls $out/";
|
||||||
});
|
});
|
@ -1,25 +1,25 @@
|
|||||||
diff --git a/cps/__init__.py b/cps/__init__.py
|
diff --git a/cps/__init__.py b/cps/__init__.py
|
||||||
index 1ba1f778..da0bc718 100644
|
index 269e4aca..e2b828a9 100644
|
||||||
--- a/cps/__init__.py
|
--- a/cps/__init__.py
|
||||||
+++ b/cps/__init__.py
|
+++ b/cps/__init__.py
|
||||||
@@ -100,7 +100,6 @@ updater_thread = Updater()
|
@@ -150,7 +150,6 @@ def create_app():
|
||||||
def create_app():
|
|
||||||
lm.login_view = 'web.login'
|
lm.login_view = 'web.login'
|
||||||
lm.anonymous_user = ub.Anonymous
|
lm.anonymous_user = ub.Anonymous
|
||||||
- lm.session_protection = 'strong'
|
- lm.session_protection = 'strong' if config.config_session == 1 else "basic"
|
||||||
|
|
||||||
if csrf:
|
db.CalibreDB.update_config(config)
|
||||||
csrf.init_app(app)
|
db.CalibreDB.setup_db(config.config_calibre_dir, cli_param.settings_path)
|
||||||
diff --git a/cps/admin.py b/cps/admin.py
|
diff --git a/cps/admin.py b/cps/admin.py
|
||||||
index 09a553b4..5c646e46 100644
|
index 20c58aac..99d2ad19 100644
|
||||||
--- a/cps/admin.py
|
--- a/cps/admin.py
|
||||||
+++ b/cps/admin.py
|
+++ b/cps/admin.py
|
||||||
@@ -104,8 +104,6 @@ def before_request():
|
@@ -101,8 +101,6 @@ def admin_required(f):
|
||||||
# make remember me function work
|
|
||||||
if current_user.is_authenticated:
|
@admi.before_app_request
|
||||||
confirm_login()
|
def before_request():
|
||||||
- if not ub.check_user_session(current_user.id, flask_session.get('_id')) and 'opds' not in request.path:
|
- if not ub.check_user_session(current_user.id, flask_session.get('_id')) and 'opds' not in request.path:
|
||||||
- logout_user()
|
- logout_user()
|
||||||
g.constants = constants
|
g.constants = constants
|
||||||
g.user = current_user
|
g.google_site_verification = os.getenv('GOOGLE_SITE_VERIFICATION','')
|
||||||
g.allow_registration = config.config_public_reg
|
g.allow_registration = config.config_public_reg
|
||||||
|
Loading…
x
Reference in New Issue
Block a user