diff --git a/lib/base/networking/api/handler/grpc_handler.dart b/lib/base/networking/api/handler/grpc_handler.dart index 88d082f0..89ec8f9f 100644 --- a/lib/base/networking/api/handler/grpc_handler.dart +++ b/lib/base/networking/api/handler/grpc_handler.dart @@ -22,7 +22,7 @@ class GrpcHandler { _channel = ClientChannel( host, port: port, - options: const ChannelOptions(credentials: ChannelCredentials.insecure()), + options: const ChannelOptions(credentials: ChannelCredentials.secure()), ); } diff --git a/lib/config/app_config.dart b/lib/config/app_config.dart index 8bf881bb..1238bed3 100644 --- a/lib/config/app_config.dart +++ b/lib/config/app_config.dart @@ -1,5 +1,3 @@ -import 'dart:io'; - /// AppConfig - Defines the configuration for the application. class AppConfig { static const String appName = 'GoCast Mobile'; @@ -10,14 +8,7 @@ class AppConfig { // Determine the root URL based on the platform // Used for development only. Once the api is deployed, this can be ignored. - static String get _rootUrl { - if (Platform.isAndroid) { - return 'http://10.0.2.2:8081/api'; - } else if (Platform.isIOS) { - return 'http://localhost:8081/api'; - } - throw UnsupportedError('Unsupported platform'); - } + static String get _rootUrl => 'https://1279.test.live.mm.rbg.tum.de'; // Authentication URLs static String get basicAuthUrl => @@ -28,13 +19,10 @@ class AppConfig { static String get ssoRedirectUrl => 'https://live.rbg.tum.de'; // gRPC routes - static String get grpcHost { - return Platform.isAndroid ? '10.0.2.2' : 'localhost'; - } + static String get grpcHost => 'grpc-1279.test.live.mm.rbg.tum.de'; - static const int grpcPort = 8081; + static const int grpcPort = 443; } - /// Routes - Defines HTTP and gRPC routes for the application. class Routes { Routes._(); // Private constructor