Skip to content

Commit a5ad58b

Browse files
committed
fix linting
Signed-off-by: Callum Styan <callumstyan@gmail.com>
1 parent 22c0711 commit a5ad58b

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

coderd/workspaceapps/apptest/apptest.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -839,7 +839,7 @@ func Run(t *testing.T, appHostIsPrimary bool, factory DeploymentFactory) {
839839
})
840840

841841
// Update the template CORS behavior.
842-
b := codersdk.CORSBehavior(tc.behavior)
842+
b := tc.behavior
843843
template, err := appDetails.SDKClient.UpdateTemplateMeta(ctx, appDetails.Workspace.TemplateID, codersdk.UpdateTemplateMeta{
844844
CORSBehavior: &b,
845845
})
@@ -1856,7 +1856,7 @@ func Run(t *testing.T, appHostIsPrimary bool, factory DeploymentFactory) {
18561856
require.NoError(t, err)
18571857

18581858
// Update the template CORS behavior.
1859-
b := codersdk.CORSBehavior(tc.behavior)
1859+
b := tc.behavior
18601860
template, err := appDetails.SDKClient.UpdateTemplateMeta(ctx, appDetails.Workspace.TemplateID, codersdk.UpdateTemplateMeta{
18611861
CORSBehavior: &b,
18621862
})

coderd/workspaceapps/proxy.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -344,13 +344,10 @@ func (s *Server) determineCORSBehavior(token *SignedToken, app appurl.Applicatio
344344

345345
switch behavior {
346346
case codersdk.CORSBehaviorPassthru:
347-
fmt.Println("passthru")
348347
// Bypass the CORS middleware.
349348
next.ServeHTTP(rw, r)
350349
return
351350
default:
352-
fmt.Println("default cors")
353-
354351
// Apply the CORS middleware.
355352
corsHandler.ServeHTTP(rw, r)
356353
}
@@ -597,7 +594,6 @@ func (s *Server) proxyWorkspaceApp(rw http.ResponseWriter, r *http.Request, appT
597594
proxy.ModifyResponse = func(r *http.Response) error {
598595
// If passthru behavior is set, disable our CORS header stripping.
599596
if cors.HasBehavior(r.Request.Context(), codersdk.CORSBehaviorPassthru) {
600-
fmt.Println("not modifying headers!!!")
601597
return nil
602598
}
603599
r.Header.Del(httpmw.AccessControlAllowOriginHeader)

0 commit comments

Comments
 (0)