Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
ARSnova Backend
Manage
Activity
Members
Labels
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Privacy
Imprint
Contact
Snippets
Groups
Projects
Show more breadcrumbs
Paul-Christian Volkmer
ARSnova Backend
Commits
3e406050
Commit
3e406050
authored
7 years ago
by
Daniel Gerhardt
Browse files
Options
Downloads
Plain Diff
Merge branch '2.x'
parents
c21e5c18
d2562f45
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/de/thm/arsnova/controller/WelcomeController.java
+3
-3
3 additions, 3 deletions
...ain/java/de/thm/arsnova/controller/WelcomeController.java
with
3 additions
and
3 deletions
src/main/java/de/thm/arsnova/controller/WelcomeController.java
+
3
−
3
View file @
3e406050
...
@@ -57,13 +57,13 @@ public class WelcomeController extends AbstractController {
...
@@ -57,13 +57,13 @@ public class WelcomeController extends AbstractController {
private
Properties
versionInfoProperties
;
private
Properties
versionInfoProperties
;
@RequestMapping
(
value
=
"/"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/"
,
method
=
RequestMethod
.
GET
)
public
View
home
(
final
HttpServletRequest
request
)
{
public
View
home
()
{
return
new
RedirectView
(
mobileContextPath
+
"/"
,
false
);
return
new
RedirectView
(
mobileContextPath
+
"/"
,
false
);
}
}
@RequestMapping
(
value
=
"/"
,
method
=
RequestMethod
.
GET
,
produces
=
"application/json"
)
@RequestMapping
(
value
=
"/"
,
method
=
RequestMethod
.
GET
,
produces
=
"application/json"
)
@ResponseBody
@ResponseBody
public
Map
<
String
,
Object
>
jsonHome
(
final
HttpServletRequest
request
)
{
public
Map
<
String
,
Object
>
jsonHome
()
{
Map
<
String
,
Object
>
response
=
new
HashMap
<>();
Map
<
String
,
Object
>
response
=
new
HashMap
<>();
Map
<
String
,
Object
>
version
=
new
HashMap
<>();
Map
<
String
,
Object
>
version
=
new
HashMap
<>();
...
@@ -85,7 +85,7 @@ public class WelcomeController extends AbstractController {
...
@@ -85,7 +85,7 @@ public class WelcomeController extends AbstractController {
final
HttpServletRequest
request
final
HttpServletRequest
request
)
{
)
{
/* Block requests from the server itself to prevent DoS attacks caused by request loops */
/* Block requests from the server itself to prevent DoS attacks caused by request loops */
if
(
"127.0.0.1"
.
equals
(
request
.
getRemoteAddr
()))
{
if
(
"127.0.0.1"
.
equals
(
request
.
getRemoteAddr
())
||
"::1"
.
equals
(
request
.
getRemoteAddr
())
)
{
throw
new
BadRequestException
(
"Access to localhost not allowed."
);
throw
new
BadRequestException
(
"Access to localhost not allowed."
);
}
}
/* Block requests to servers in private networks */
/* Block requests to servers in private networks */
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment