Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
TelcoDB
Web Frontend
Commits
8cb67c07
Verified
Commit
8cb67c07
authored
Oct 27, 2019
by
Elias Ojala
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Redirect /32 (IPv4) and /128 (IPv6) networks to individual IP address page
parent
f7592c75
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
1 deletion
+5
-1
src/controllers/net.controller.ts
src/controllers/net.controller.ts
+4
-0
views/ip/show.twig
views/ip/show.twig
+1
-1
No files found.
src/controllers/net.controller.ts
View file @
8cb67c07
...
...
@@ -22,6 +22,10 @@ router.get("/:zero/:one([0-9][0-9]?[0-9]?)", (req: Request, res: Response, next:
next
();
}
else
if
(
isIp
.
v6
(
ip
)
&&
addressLength
>
128
)
{
next
();
}
else
if
(
isIp
.
v4
(
ip
)
&&
addressLength
===
32
)
{
res
.
redirect
(
301
,
`/ip/
${
ip
}
`
);
}
else
if
(
isIp
.
v6
(
ip
)
&&
addressLength
===
128
)
{
res
.
redirect
(
301
,
`/ip/
${
ip
}
`
);
}
else
{
const
cidrNotation
=
`
${
ip
}
/
${
addressLength
}
`
;
const
ipVersion
=
isIp
.
version
(
ip
);
...
...
views/ip/show.twig
View file @
8cb67c07
...
...
@@ -30,7 +30,7 @@
{%
endif
%}
{%
if
announcements
%}
{%
if
announcements
|
length
>
0
%}
<h2>
BGP announcements
</h2>
<table
class=
"table w-auto"
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment