Skip to content

Commit

Permalink
Don't validate the JSON file connection string if APPLICATIONINSIGHTS…
Browse files Browse the repository at this point in the history
…_CONNECTION_STRING env var is used
  • Loading branch information
jeanbisutti committed Jun 25, 2024
1 parent 82d6853 commit 5481277
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -743,7 +743,8 @@ static void overlayFromEnv(
String replacedConnectionString = stringSubstitutor.replace(config.connectionString);
if (replacedConnectionString != null
&& !replacedConnectionString.startsWith("InstrumentationKey=")
&& config.connectionString.equals(replacedConnectionString)) {
&& config.connectionString.equals(replacedConnectionString)
&& System.getenv(APPLICATIONINSIGHTS_CONNECTION_STRING_ENV) == null) {
throw new FriendlyException(
"Your connection string seems to have a wrong format: \""
+ config.connectionString
Expand Down

0 comments on commit 5481277

Please sign in to comment.