Skip to content

Commit b29499b

Browse files
committedNov 26, 2024
Support CORS behaviour
Signed-off-by: Danny Kopping <[email protected]>
1 parent 701d7c8 commit b29499b

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed
 

‎provider/app.go

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,25 @@ func appResource() *schema.Resource {
162162
return diag.Errorf("invalid app share %q, must be one of \"owner\", \"authenticated\", \"public\"", valStr)
163163
},
164164
},
165+
"cors_behavior": {
166+
Type: schema.TypeString,
167+
Default: "simple",
168+
ForceNew: true,
169+
Optional: true,
170+
ValidateDiagFunc: func(val interface{}, c cty.Path) diag.Diagnostics {
171+
valStr, ok := val.(string)
172+
if !ok {
173+
return diag.Errorf("expected string, got %T", val)
174+
}
175+
176+
switch valStr {
177+
case "simple", "passthru":
178+
return nil
179+
}
180+
181+
return diag.Errorf("invalid app CORS behavior %q, must be one of \"simple\", \"passthru\"", valStr)
182+
},
183+
},
165184
"url": {
166185
Type: schema.TypeString,
167186
Description: "An external url if `external=true` or a URL to be proxied to from inside the workspace. " +

0 commit comments

Comments
 (0)
Please sign in to comment.