From b7763a61a6522a3463c739bde0931c3b62d00ca7 Mon Sep 17 00:00:00 2001 From: cel Date: Tue, 30 Jun 2020 09:44:17 -0400 Subject: [PATCH] Check http_referer in Makefile --- Makefile | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index e51b1f6..44b4f33 100644 --- a/Makefile +++ b/Makefile @@ -13,18 +13,25 @@ all: $(BIN) $(BIN): $(OBJ) -install: $(BIN) domainrc +install: $(BIN) domainrc dillorc mkdir -p $(DPI_DIR)/$(NAME) cp -f $(BIN) $(DPI_DIR)/$(NAME) -link: $(BIN) domainrc +link: $(BIN) domainrc dillorc mkdir -p $(DPI_DIR)/$(NAME) ln -frs $(BIN) $(DPI_DIR)/$(NAME) +dillorc: $(DILLO_DIR)/dillorc + @grep -q '^http_referer=\(host\|path\)$$' $< || \ + echo 'Note: Set "http_referer=path" in $< to allow form submissions to work' + domainrc: $(DILLO_DIR)/domainrc @grep -q '^default accept$$' $< || \ echo 'Note: Set "default accept" in $< to enable redirects' +$(DILLO_DIR)/dillorc: + echo 'http_referer=path' > $@ + $(DILLO_DIR)/domainrc: echo 'default accept' > $@