Skip to content

Commit e06d1a0

Browse files
authored
Merge pull request #187 from common-workflow-language/CORS
[wip] enable CORS
2 parents 9929cfa + 4c0f148 commit e06d1a0

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/main/java/org/commonwl/view/WebConfig.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
import org.springframework.context.annotation.Configuration;
2525
import org.springframework.http.MediaType;
2626
import org.springframework.web.servlet.config.annotation.ContentNegotiationConfigurer;
27+
import org.springframework.web.servlet.config.annotation.CorsRegistry;
2728
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
2829

2930
@Configuration
@@ -64,4 +65,9 @@ public void configureContentNegotiation(ContentNegotiationConfigurer configurer)
6465
.mediaType("yaml", parseMediaType("text/x-yaml"))
6566
.mediaType("raw", MediaType.APPLICATION_OCTET_STREAM);
6667
}
67-
}
68+
69+
@Override
70+
public void addCorsMappings(CorsRegistry registry) {
71+
registry.addMapping("/**"); // .setMaxAge(Long.MAX_VALUE)
72+
}
73+
}

0 commit comments

Comments
 (0)