Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use HTTPS for the API #87

Open
smallketchup82 opened this issue Sep 30, 2024 · 1 comment
Open

Use HTTPS for the API #87

smallketchup82 opened this issue Sep 30, 2024 · 1 comment
Assignees

Comments

@smallketchup82
Copy link
Member

it currently uses http which is unencrypted. questions are unlikely to be sensitive, and usernames arent sensitive, but its still probably a good idea

@smallketchup82
Copy link
Member Author

okay i got this working, but it really pains me. for some reason using environment variables doesnt work. the following works with https though:

diff --git a/docker-compose.yaml b/docker-compose.yaml
index 99fe447..dee74e5 100644
--- a/docker-compose.yaml
+++ b/docker-compose.yaml
@@ -2,8 +2,10 @@ services:
     galaxygpt-api:
         image: ghcr.io/galaxypedia-wiki/galaxygpt:main
         restart: unless-stopped
+        volumes:
+            - ~/.aspnet/https:/https:ro
         environment:
-            - ASPNETCORE_URLS=http://0.0.0.0:3636
+            - ASPNETCORE_URLS=https://0.0.0.0:3636;
         depends_on:
             - qdrant
         ports:
diff --git a/galaxygpt-api/appsettings.json b/galaxygpt-api/appsettings.json
index be2e30e..37b75c6 100644
--- a/galaxygpt-api/appsettings.json
+++ b/galaxygpt-api/appsettings.json
@@ -6,4 +6,12 @@
     }
   },
   "AllowedHosts": "*",
-}
+  "Kestrel": {
+    "Certificates": {
+      "Default": {
+        "Path": "/https/aspnetapp.pfx",
+        "Password": "password"
+      }
+    }
+  }
+}
\ No newline at end of file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant