Posts

Showing posts from April 1, 2019

Jquery date picker dont set value to date selected

Image
0 $("#forecastfrom").datepicker({ dateFormat: "yymmdd", // minDate: 0,//set current date as minDate onSelect: function(date) { var dt2 = $('#forecastto'); var startDate = $(this).datepicker('getDate'); var minDate = $(this).datepicker('getDate'); var $this = $(this) $.ajax({ url: "<?php echo site_url( 'url' ); ?>", type: 'POST', dataType: 'JSON', data: { intDateYYYYMMDD: this.value }, success: function(data) { if (data.error == false) { $this.val(data.message); } }, error: function() { } }).done(function(data) { if (data.error == false) { $this.val(data.message);//set the value

Enable wildcard in CORS spring security + webFlux

Image
0 I have spring security + CORS enable into a project that is made with spring webFlux. My problem here is that we accept for example requests from: http://localhost:4200. How I can make that CORS will accept reqs from http://*.localhost:4200 like http://a.localhost:4200, http://b.localhost:4200 ? My CORS config looks like: @Bean @Order(Ordered.HIGHEST_PRECEDENCE) public CorsWebFilter corsFilter() { UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource(); CorsConfiguration config = new CorsConfiguration(); config.setAllowCredentials(true); config.setAllowedOrigins(corsConfigData.getAllowedOrigins()); config.setAllowedHeaders(corsConfigData.getAllowedHeaders()); config.setAllowedMethods(corsConfigData.getAllowedMethods()); source.registerCorsConfiguration