Browse Source

Allow webfinger for keybase.io verification of sites

Bob Mottram 8 years ago
parent
commit
2361b0f0a8

+ 12
- 0
src/freedombone-app-etherpad View File

@@ -537,6 +537,12 @@ function install_etherpad {
537 537
         echo '    proxy_set_header  Host $host;' >> $etherpad_nginx_site
538 538
         echo '    proxy_buffering   off;' >> $etherpad_nginx_site
539 539
         echo '  }' >> $etherpad_nginx_site
540
+        echo '' >> $etherpad_nginx_site
541
+        echo "  # make sure webfinger and other well known services aren't blocked" >> $etherpad_nginx_site
542
+        echo '  # by denying dot files and rewrite request to the front controller' >> $etherpad_nginx_site
543
+        echo '  location ^~ /.well-known/ {' >> $etherpad_nginx_site
544
+        echo '      allow all;' >> $etherpad_nginx_site
545
+        echo '  }' >> $etherpad_nginx_site
540 546
         echo '}' >> $etherpad_nginx_site
541 547
     else
542 548
         echo -n '' > $etherpad_nginx_site
@@ -562,6 +568,12 @@ function install_etherpad {
562 568
     echo '    proxy_set_header  Host $host;' >> $etherpad_nginx_site
563 569
     echo '    proxy_buffering   off;' >> $etherpad_nginx_site
564 570
     echo '  }' >> $etherpad_nginx_site
571
+    echo '' >> $etherpad_nginx_site
572
+    echo "  # make sure webfinger and other well known services aren't blocked" >> $etherpad_nginx_site
573
+    echo '  # by denying dot files and rewrite request to the front controller' >> $etherpad_nginx_site
574
+    echo '  location ^~ /.well-known/ {' >> $etherpad_nginx_site
575
+    echo '      allow all;' >> $etherpad_nginx_site
576
+    echo '  }' >> $etherpad_nginx_site
565 577
     echo '}' >> $etherpad_nginx_site
566 578
 
567 579
     function_check create_site_certificate

+ 12
- 0
src/freedombone-app-ghost View File

@@ -376,6 +376,12 @@ function install_ghost {
376 376
         echo '        log_not_found off;' >> /etc/nginx/sites-available/${GHOST_DOMAIN_NAME}
377 377
         echo '        access_log /dev/null;' >> /etc/nginx/sites-available/${GHOST_DOMAIN_NAME}
378 378
         echo '    }' >> /etc/nginx/sites-available/${GHOST_DOMAIN_NAME}
379
+        echo '' >> /etc/nginx/sites-available/${GHOST_DOMAIN_NAME}
380
+        echo "    # make sure webfinger and other well known services aren't blocked" >> /etc/nginx/sites-available/${GHOST_DOMAIN_NAME}
381
+        echo '    # by denying dot files and rewrite request to the front controller' >> /etc/nginx/sites-available/${GHOST_DOMAIN_NAME}
382
+        echo '    location ^~ /.well-known/ {' >> /etc/nginx/sites-available/${GHOST_DOMAIN_NAME}
383
+        echo '        allow all;' >> /etc/nginx/sites-available/${GHOST_DOMAIN_NAME}
384
+        echo '    }' >> /etc/nginx/sites-available/${GHOST_DOMAIN_NAME}
379 385
         echo '}' >> /etc/nginx/sites-available/${GHOST_DOMAIN_NAME}
380 386
         echo '' >> /etc/nginx/sites-available/${GHOST_DOMAIN_NAME}
381 387
     else
@@ -408,6 +414,12 @@ function install_ghost {
408 414
     echo '        log_not_found off;' >> /etc/nginx/sites-available/${GHOST_DOMAIN_NAME}
409 415
     echo '        access_log /dev/null;' >> /etc/nginx/sites-available/${GHOST_DOMAIN_NAME}
410 416
     echo '    }' >> /etc/nginx/sites-available/${GHOST_DOMAIN_NAME}
417
+    echo '' >> /etc/nginx/sites-available/${GHOST_DOMAIN_NAME}
418
+    echo "    # make sure webfinger and other well known services aren't blocked" >> /etc/nginx/sites-available/${GHOST_DOMAIN_NAME}
419
+    echo '    # by denying dot files and rewrite request to the front controller' >> /etc/nginx/sites-available/${GHOST_DOMAIN_NAME}
420
+    echo '    location ^~ /.well-known/ {' >> /etc/nginx/sites-available/${GHOST_DOMAIN_NAME}
421
+    echo '        allow all;' >> /etc/nginx/sites-available/${GHOST_DOMAIN_NAME}
422
+    echo '    }' >> /etc/nginx/sites-available/${GHOST_DOMAIN_NAME}
411 423
     echo '}' >> /etc/nginx/sites-available/${GHOST_DOMAIN_NAME}
412 424
 
413 425
     function_check create_site_certificate

+ 11
- 0
src/freedombone-app-gnusocial View File

@@ -606,6 +606,12 @@ function install_gnusocial_main {
606 606
         echo '  location ~ /\.(ht|git) {' >> $gnusocial_nginx_site
607 607
         echo '    deny all;' >> $gnusocial_nginx_site
608 608
         echo '  }' >> $gnusocial_nginx_site
609
+        echo '' >> $gnusocial_nginx_site
610
+        echo "  # make sure webfinger and other well known services aren't blocked" >> $gnusocial_nginx_site
611
+        echo '  # by denying dot files and rewrite request to the front controller' >> $gnusocial_nginx_site
612
+        echo '  location ^~ /.well-known/ {' >> $gnusocial_nginx_site
613
+        echo '      allow all;' >> $gnusocial_nginx_site
614
+        echo '  }' >> $gnusocial_nginx_site
609 615
         echo '}' >> $gnusocial_nginx_site
610 616
     else
611 617
         echo -n '' > $gnusocial_nginx_site
@@ -649,6 +655,11 @@ function install_gnusocial_main {
649 655
     echo '  location ~ /\.(ht|git) {' >> $gnusocial_nginx_site
650 656
     echo '    deny all;' >> $gnusocial_nginx_site
651 657
     echo '  }' >> $gnusocial_nginx_site
658
+    echo "  # make sure webfinger and other well known services aren't blocked" >> $gnusocial_nginx_site
659
+    echo '  # by denying dot files and rewrite request to the front controller' >> $gnusocial_nginx_site
660
+    echo '  location ^~ /.well-known/ {' >> $gnusocial_nginx_site
661
+    echo '      allow all;' >> $gnusocial_nginx_site
662
+    echo '  }' >> $gnusocial_nginx_site
652 663
     echo '}' >> $gnusocial_nginx_site
653 664
 
654 665
     function_check configure_php

+ 12
- 0
src/freedombone-app-gogs View File

@@ -492,6 +492,12 @@ function install_gogs {
492 492
         echo '        log_not_found off;' >> /etc/nginx/sites-available/${GIT_DOMAIN_NAME}
493 493
         echo '        access_log /dev/null;' >> /etc/nginx/sites-available/${GIT_DOMAIN_NAME}
494 494
         echo '    }' >> /etc/nginx/sites-available/${GIT_DOMAIN_NAME}
495
+        echo '' >> /etc/nginx/sites-available/${GIT_DOMAIN_NAME}
496
+        echo "    # make sure webfinger and other well known services aren't blocked" >> /etc/nginx/sites-available/${GIT_DOMAIN_NAME}
497
+        echo '    # by denying dot files and rewrite request to the front controller' >> /etc/nginx/sites-available/${GIT_DOMAIN_NAME}
498
+        echo '    location ^~ /.well-known/ {' >> /etc/nginx/sites-available/${GIT_DOMAIN_NAME}
499
+        echo '        allow all;' >> /etc/nginx/sites-available/${GIT_DOMAIN_NAME}
500
+        echo '    }' >> /etc/nginx/sites-available/${GIT_DOMAIN_NAME}
495 501
         echo '}' >> /etc/nginx/sites-available/${GIT_DOMAIN_NAME}
496 502
         echo '' >> /etc/nginx/sites-available/${GIT_DOMAIN_NAME}
497 503
     else
@@ -524,6 +530,12 @@ function install_gogs {
524 530
     echo '        log_not_found off;' >> /etc/nginx/sites-available/${GIT_DOMAIN_NAME}
525 531
     echo '        access_log /dev/null;' >> /etc/nginx/sites-available/${GIT_DOMAIN_NAME}
526 532
     echo '    }' >> /etc/nginx/sites-available/${GIT_DOMAIN_NAME}
533
+    echo '' >> /etc/nginx/sites-available/${GIT_DOMAIN_NAME}
534
+    echo "    # make sure webfinger and other well known services aren't blocked" >> /etc/nginx/sites-available/${GIT_DOMAIN_NAME}
535
+    echo '    # by denying dot files and rewrite request to the front controller' >> /etc/nginx/sites-available/${GIT_DOMAIN_NAME}
536
+    echo '    location ^~ /.well-known/ {' >> /etc/nginx/sites-available/${GIT_DOMAIN_NAME}
537
+    echo '        allow all;' >> /etc/nginx/sites-available/${GIT_DOMAIN_NAME}
538
+    echo '    }' >> /etc/nginx/sites-available/${GIT_DOMAIN_NAME}
527 539
     echo '}' >> /etc/nginx/sites-available/${GIT_DOMAIN_NAME}
528 540
 
529 541
     function_check configure_php

+ 2
- 0
src/freedombone-app-jitsi View File

@@ -407,6 +407,8 @@ function install_jitsi {
407 407
     sed -i "s|minHDHeight:.*|minHDHeight: 800,|g" /etc/jitsi/meet/${JITSI_DOMAIN_NAME}-config.js
408 408
     sed -i "s|clientNode:.*|clientNode: 'https://${JITSI_DOMAIN_NAME}',|g" /etc/jitsi/meet/${JITSI_DOMAIN_NAME}-config.js
409 409
 
410
+    sed -i "s|navigator.mozGetUserMedia|navigator.mediaDevices.getUserMedia|g" /usr/share/jitsi-meet/libs/lib-jitsi-meet.min.js
411
+
410 412
     function_check nginx_ensite
411 413
     nginx_ensite ${JITSI_DOMAIN_NAME}.conf
412 414
 

+ 12
- 0
src/freedombone-app-mailpile View File

@@ -323,6 +323,12 @@ function install_mailpile {
323 323
         echo '    proxy_set_header X-Forwarded-Server $host;' >> $mailpile_nginx_site
324 324
         echo '    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;' >> $mailpile_nginx_site
325 325
         echo '  }' >> $mailpile_nginx_site
326
+        echo '' >> $mailpile_nginx_site
327
+        echo "  # make sure webfinger and other well known services aren't blocked" >> $mailpile_nginx_site
328
+        echo '  # by denying dot files and rewrite request to the front controller' >> $mailpile_nginx_site
329
+        echo '  location ^~ /.well-known/ {' >> $mailpile_nginx_site
330
+        echo '      allow all;' >> $mailpile_nginx_site
331
+        echo '  }' >> $mailpile_nginx_site
326 332
         echo '}' >> $mailpile_nginx_site
327 333
     else
328 334
         echo -n '' > $mailpile_nginx_site
@@ -349,6 +355,12 @@ function install_mailpile {
349 355
     echo '    proxy_set_header X-Forwarded-Server $host;' >> $mailpile_nginx_site
350 356
     echo '    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;' >> $mailpile_nginx_site
351 357
     echo '  }' >> $mailpile_nginx_site
358
+    echo '' >> $mailpile_nginx_site
359
+    echo "  # make sure webfinger and other well known services aren't blocked" >> $mailpile_nginx_site
360
+    echo '  # by denying dot files and rewrite request to the front controller' >> $mailpile_nginx_site
361
+    echo '  location ^~ /.well-known/ {' >> $mailpile_nginx_site
362
+    echo '      allow all;' >> $mailpile_nginx_site
363
+    echo '  }' >> $mailpile_nginx_site
352 364
     echo '}' >> $mailpile_nginx_site
353 365
 
354 366
     function_check create_site_certificate

+ 12
- 0
src/freedombone-app-postactiv View File

@@ -450,6 +450,12 @@ function install_postactiv_main {
450 450
         echo '  location ~ /\.(ht|git) {' >> $postactiv_nginx_site
451 451
         echo '    deny all;' >> $postactiv_nginx_site
452 452
         echo '  }' >> $postactiv_nginx_site
453
+        echo '' >> $postactiv_nginx_site
454
+        echo "  # make sure webfinger and other well known services aren't blocked" >> $postactiv_nginx_site
455
+        echo '  # by denying dot files and rewrite request to the front controller' >> $postactiv_nginx_site
456
+        echo '  location ^~ /.well-known/ {' >> $postactiv_nginx_site
457
+        echo '      allow all;' >> $postactiv_nginx_site
458
+        echo '  }' >> $postactiv_nginx_site
453 459
         echo '}' >> $postactiv_nginx_site
454 460
     else
455 461
         echo -n '' > $postactiv_nginx_site
@@ -493,6 +499,12 @@ function install_postactiv_main {
493 499
     echo '  location ~ /\.(ht|git) {' >> $postactiv_nginx_site
494 500
     echo '    deny all;' >> $postactiv_nginx_site
495 501
     echo '  }' >> $postactiv_nginx_site
502
+    echo '' >> $postactiv_nginx_site
503
+    echo "  # make sure webfinger and other well known services aren't blocked" >> $postactiv_nginx_site
504
+    echo '  # by denying dot files and rewrite request to the front controller' >> $postactiv_nginx_site
505
+    echo '  location ^~ /.well-known/ {' >> $postactiv_nginx_site
506
+    echo '      allow all;' >> $postactiv_nginx_site
507
+    echo '  }' >> $postactiv_nginx_site
496 508
     echo '}' >> $postactiv_nginx_site
497 509
 
498 510
     function_check configure_php