Skip to content
Snippets Groups Projects
Commit 64aa8a93 authored by Bob Mottram's avatar Bob Mottram
Browse files

Block archiveteam on fediverse apps

parent 7f9b0481
No related branches found
No related tags found
No related merge requests found
Pipeline #74751 failed
...@@ -335,6 +335,9 @@ function configure_interactive_gnusocial { ...@@ -335,6 +335,9 @@ function configure_interactive_gnusocial {
} }
function upgrade_gnusocial { function upgrade_gnusocial {
read_config_param GNUSOCIAL_DOMAIN_NAME
update_user_agent "$GNUSOCIAL_DOMAIN_NAME"
CURR_GNUSOCIAL_COMMIT=$(get_completion_param "gnusocial commit") CURR_GNUSOCIAL_COMMIT=$(get_completion_param "gnusocial commit")
if [[ "$CURR_GNUSOCIAL_COMMIT" == "$GNUSOCIAL_COMMIT" ]]; then if [[ "$CURR_GNUSOCIAL_COMMIT" == "$GNUSOCIAL_COMMIT" ]]; then
return return
...@@ -647,6 +650,10 @@ function install_gnusocial_main { ...@@ -647,6 +650,10 @@ function install_gnusocial_main {
echo ' # Index'; echo ' # Index';
echo ' index index.php;'; echo ' index index.php;';
echo ''; echo '';
echo " if (\$http_user_agent ~* (.*archivebot.*|.*archiveteam.*)) {";
echo ' return 403;';
echo ' }';
echo '';
echo ' # PHP'; echo ' # PHP';
echo ' location ~ \.php {'; echo ' location ~ \.php {';
echo ' client_max_body_size 50m;'; echo ' client_max_body_size 50m;';
...@@ -699,6 +706,10 @@ function install_gnusocial_main { ...@@ -699,6 +706,10 @@ function install_gnusocial_main {
echo ' # Index'; echo ' # Index';
echo ' index index.php;'; echo ' index index.php;';
echo ''; echo '';
echo " if (\$http_user_agent ~* (.*archivebot.*|.*archiveteam.*)) {";
echo ' return 403;';
echo ' }';
echo '';
echo ' # PHP'; echo ' # PHP';
echo ' location ~ \.php {'; echo ' location ~ \.php {';
echo ' client_max_body_size 50m;'; echo ' client_max_body_size 50m;';
......
...@@ -348,6 +348,9 @@ function configure_interactive_postactiv { ...@@ -348,6 +348,9 @@ function configure_interactive_postactiv {
} }
function upgrade_postactiv { function upgrade_postactiv {
read_config_param POSTACTIV_DOMAIN_NAME
update_user_agent "$POSTACTIV_DOMAIN_NAME"
CURR_POSTACTIV_COMMIT=$(get_completion_param "postactiv commit") CURR_POSTACTIV_COMMIT=$(get_completion_param "postactiv commit")
if [[ "$CURR_POSTACTIV_COMMIT" == "$POSTACTIV_COMMIT" ]]; then if [[ "$CURR_POSTACTIV_COMMIT" == "$POSTACTIV_COMMIT" ]]; then
return return
...@@ -665,6 +668,10 @@ function install_postactiv_main { ...@@ -665,6 +668,10 @@ function install_postactiv_main {
echo ' # Index'; echo ' # Index';
echo ' index index.php;'; echo ' index index.php;';
echo ''; echo '';
echo " if (\$http_user_agent ~* (.*archivebot.*|.*archiveteam.*)) {";
echo ' return 403;';
echo ' }';
echo '';
echo ' # PHP'; echo ' # PHP';
echo ' location ~ \.php {'; echo ' location ~ \.php {';
echo ' client_max_body_size 50m;'; echo ' client_max_body_size 50m;';
...@@ -717,6 +724,10 @@ function install_postactiv_main { ...@@ -717,6 +724,10 @@ function install_postactiv_main {
echo ' # Index'; echo ' # Index';
echo ' index index.php;'; echo ' index index.php;';
echo ''; echo '';
echo " if (\$http_user_agent ~* (.*archivebot.*|.*archiveteam.*)) {";
echo ' return 403;';
echo ' }';
echo '';
echo ' # PHP'; echo ' # PHP';
echo ' location ~ \.php {'; echo ' location ~ \.php {';
echo ' client_max_body_size 50m;'; echo ' client_max_body_size 50m;';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment