feat(practice): add the code runner port and its TLS client
This commit is contained in:
1 parent
53a125f2b5
commit
facc1789b1
24 files changed
+3374
-6
No files matched your search
@@ -156,6 +156,10 @@ type Config struct {
|
||||
// assignment. Reviewed source provenance is required separately.
|
||||
AssessmentDemoCategoriesEnabled bool
|
||||
|
||||
// CodeRunner configures the client of the own code runner. It is disabled
|
||||
// unless CODE_RUNNER_URL is set.
|
||||
CodeRunner CodeRunnerSettings
|
||||
|
||||
// TrustedProxyCIDRs are the reverse proxies in front of the API. The
|
||||
// client address is taken from X-Forwarded-For only through them (see
|
||||
// middleware.ClientIP). Empty trusts no proxy.
|
||||
@@ -250,6 +254,11 @@ func (config *Config) loadIdentityAndProxySettings(lookup LookupEnv) error {
|
||||
if err := config.loadAssessment(lookup); err != nil {
|
||||
return err
|
||||
}
|
||||
codeRunner, err := LoadCodeRunnerSettings(lookup)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
config.CodeRunner = codeRunner
|
||||
return config.loadTrustedProxies(lookup)
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user