From a77d0dfa74f44819ae0729fa609ac595ac5e4ad7 Mon Sep 17 00:00:00 2001 From: wh1te909 Date: Wed, 19 Aug 2020 08:44:26 +0000 Subject: [PATCH] make instructions clearer for new nginx config --- .../management/commands/post_update_tasks.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/api/tacticalrmm/core/management/commands/post_update_tasks.py b/api/tacticalrmm/core/management/commands/post_update_tasks.py index 249befc8..e8807065 100644 --- a/api/tacticalrmm/core/management/commands/post_update_tasks.py +++ b/api/tacticalrmm/core/management/commands/post_update_tasks.py @@ -39,6 +39,15 @@ class Command(BaseCommand): alias /srv/salt/scripts/; } """ + + after_this = """ + location /saltscripts/ { + internal; + add_header "Access-Control-Allow-Origin" "https://rmm.yourwebsite.com"; + alias /srv/salt/scripts/userdefined/; + } + """ + self.stdout.write(self.style.ERROR("*" * 100)) self.stdout.write("\n") self.stdout.write( @@ -53,6 +62,13 @@ class Command(BaseCommand): ) self.stdout.write(self.style.SUCCESS(new_conf)) self.stdout.write("\n") + self.stdout.write( + self.style.ERROR( + "You can paste the above right after the following block that's already in your nginx config:" + ) + ) + self.stdout.write(after_this) + self.stdout.write("\n") self.stdout.write( self.style.ERROR( "Make sure to replace rmm.yourwebsite.com with your domain"