Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitdbc504f

Browse files
committed
feat: add cors_behavior to agent apps
1 parentf871a43 commitdbc504f

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

‎provider/app.go‎

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,27 @@ func appResource() *schema.Resource {
258258
returndiag.Errorf(`invalid "coder_app" open_in value, must be one of "tab", "slim-window": %q`,valStr)
259259
},
260260
},
261+
"cors_behavior": {
262+
Type:schema.TypeString,
263+
Description:"Determines the behavior of CORS headers for the app. Simple will allow apps to "+
264+
"communicate with other workspaces owned by the same user.",
265+
ForceNew:true,
266+
Optional:true,
267+
Default:"simple",
268+
ValidateDiagFunc:func(valinterface{},c cty.Path) diag.Diagnostics {
269+
valStr,ok:=val.(string)
270+
if!ok {
271+
returndiag.Errorf("expected string, got %T",val)
272+
}
273+
274+
switchvalStr {
275+
case"passthru","simple":
276+
returnnil
277+
}
278+
279+
returndiag.Errorf(`invalid "cors_behavior" open_in value, must be one of "passthru", "simple": %q`,valStr)
280+
},
281+
},
261282
},
262283
}
263284
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp