Skip to content

Commit b29499b

Browse files
committed
Support CORS behaviour
Signed-off-by: Danny Kopping <danny@coder.com>
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy