File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -47,11 +47,18 @@ func MakeAPIImplementation() dashboardmodels.APIInterface {
4747 return "" , err
4848 }
4949
50+ // We are splitting the passed URI here so that if multiple URI's are passed
51+ // separated by a colon, the first one is returned.
5052 connectionURIToNormalize := strings .Split (stInstance .SuperTokens .ConnectionURI , ";" )[0 ]
5153
54+ // This normalizes the URI to make sure that it has things like protocol etc
55+ // injected into it before it is returned.
5256 var normalizationError error
5357 normalizedConnectionURI , normalizationError := supertokens .NewNormalisedURLDomain (connectionURIToNormalize )
5458 if normalizationError != nil {
59+ // In case of failures, we want to return a 500 here, mainly because that
60+ // is what we return if the connectionURI is invalid which is the case here
61+ // if normalization fails.
5562 return "" , normalizationError
5663 }
5764 connectionURI := normalizedConnectionURI .GetAsStringDangerous ()
You can’t perform that action at this time.
0 commit comments