Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 0abe108

Browse files
author
Rajeev Kumar Singh
committed
cors config
1 parent b3f219e commit 0abe108

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
package com.example.websocketdemo.config;
2+
3+
import org.springframework.context.annotation.Configuration;
4+
import org.springframework.web.servlet.config.annotation.CorsRegistry;
5+
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
6+
7+
/**
8+
* Created by rajeevkumarsingh on 12/06/17.
9+
*/
10+
@Configuration
11+
public class WebMvcConfig extends WebMvcConfigurerAdapter {
12+
13+
@Override
14+
public void addCorsMappings(CorsRegistry registry) {
15+
registry.addMapping("/**");
16+
}
17+
18+
}

‎src/main/resources/static/js/main.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ function connect(event) {
2020
username = document.querySelector('#name').value.trim();
2121

2222
if(username) {
23-
2423
usernamePage.classList.add('hidden');
2524
chatPage.classList.remove('hidden');
2625

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /