run chrome without cors
$ open -a Google Chrome --args --disable-web-security --user-data-dir
run chrome without cors
$ open -a Google Chrome --args --disable-web-security --user-data-dir
disable cors chrome
$ google-chrome --disable-web-security
disable cors chrome
open -na Google Chrome --args --user-data-dir=/tmp/temporary-chrome-profile-dir --disable-web-security
allow cross origin
Access-Control-Allow-Origin: *
Access-Control-Allow-Origin: <origin>
Access-Control-Allow-Origin: null
disable cors in new chrome
chrome.exe --user-data-dir="C:/Chrome dev session" --disable-web-security
enable cors
@Configuration
@EnableWebMvc
public class WebConfig extends WebMvcConfigurerAdapter {
@Override
public void addCorsMappings(CorsRegistry registry) {
registry.addMapping("/api/**")
.allowedOrigins("http://domain2.com")
.allowedMethods("PUT", "DELETE")
.allowedHeaders("header1", "header2", "header3")
.exposedHeaders("header1", "header2")
.allowCredentials(false).maxAge(3600);
}
}
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us