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

Update to preview 6 #124

Merged
merged 9 commits into from
Apr 25, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Refactoring
rafaelldi committed Apr 25, 2024

Verified

This commit was signed with the committer’s verified signature.
commit 29de0c5a75f8a68f4cb9bd1efe865b7208215e7a
Original file line number Diff line number Diff line change
@@ -105,8 +105,8 @@
params.tfm ?: projectOutput.tfm,
params.workingDirectoryPath ?: projectOutput.workingDirectory,
params.commandLineArgumentString ?: ParametersListUtil.join(projectOutput.defaultArguments),
false,

Check notice on line 108 in src/main/kotlin/me/rafaelldi/aspire/run/AspireHostExecutorFactory.kt

GitHub Actions / Qodana Community for JVM

Boolean literal argument without parameter name

Boolean literal argument without a parameter name
false,

Check notice on line 109 in src/main/kotlin/me/rafaelldi/aspire/run/AspireHostExecutorFactory.kt

GitHub Actions / Qodana Community for JVM

Boolean literal argument without parameter name

Boolean literal argument without a parameter name
params.environmentVariables,
true,
parameters.startBrowserAction,
@@ -134,22 +134,6 @@
envs[ASPIRE_ALLOW_UNSECURED_TRANSPORT] = "true"
}

val allowAnonymousDashboard = envs[DOTNET_DASHBOARD_UNSECURED_ALLOW_ANONYMOUS]?.equals("true", true) == true

//Configure Dashboard frontend authentication
//see: https://learn.microsoft.com/en-us/dotnet/aspire/fundamentals/dashboard/configuration#frontend-authentication
var browserToken: String? = null
if (!allowAnonymousDashboard) {
browserToken = UUID.randomUUID().toString()
envs[DOTNET_DASHBOARD_FRONTEND_BROWSERTOKEN] = browserToken
}

//Configure ApiKey for the Resource service
//see: https://learn.microsoft.com/en-us/dotnet/aspire/fundamentals/dashboard/configuration#resources
if (!allowAnonymousDashboard) {
envs[DOTNET_DASHBOARD_RESOURCESERVICE_APIKEY] = UUID.randomUUID().toString()
}

val useHttp = isHttpUrl || allowUnsecuredTransport

//Set the DOTNET_RESOURCE_SERVICE_ENDPOINT_URL environment variable if not specified
@@ -168,6 +152,22 @@
else "https://localhost:$openTelemetryProtocolEndpointPort"
}

val allowAnonymousDashboard = envs[DOTNET_DASHBOARD_UNSECURED_ALLOW_ANONYMOUS]?.equals("true", true) == true

//Configure Dashboard frontend authentication
//see: https://learn.microsoft.com/en-us/dotnet/aspire/fundamentals/dashboard/configuration#frontend-authentication
var browserToken: String? = null
if (!allowAnonymousDashboard) {
browserToken = UUID.randomUUID().toString()
envs[DOTNET_DASHBOARD_FRONTEND_BROWSERTOKEN] = browserToken
}

//Configure ApiKey for the Resource service
//see: https://learn.microsoft.com/en-us/dotnet/aspire/fundamentals/dashboard/configuration#resources
if (!allowAnonymousDashboard) {
envs[DOTNET_DASHBOARD_RESOURCESERVICE_APIKEY] = UUID.randomUUID().toString()
}

return EnvironmentVariableValues(browserToken)
}

Loading