A self hosted chat application with end-to-end encrypted messaging.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
551 B

5 years ago
5 years ago
5 years ago
5 years ago
  1. package org.ros.chatto;
  2. import org.springframework.context.annotation.Configuration;
  3. import org.springframework.web.servlet.config.annotation.CorsRegistry;
  4. import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
  5. @Configuration
  6. // @EnableWebMvc
  7. public class WebConfig implements WebMvcConfigurer {
  8. @Override
  9. public void addCorsMappings(CorsRegistry registry) {
  10. registry.addMapping("/api/**").allowedOrigins("*")
  11. .allowedMethods("POST", "GET", "OPTIONS").allowedHeaders("*")
  12. .allowCredentials(false).maxAge(3600);
  13. }
  14. }