Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
OpnSense
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kulya
OpnSense
Commits
a0e9f738
Commit
a0e9f738
authored
Jan 11, 2017
by
Ad Schellevis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix Content-Disposition for chrome in captive portal and network insight
parent
6b39cd2e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
11 deletions
+4
-11
ServiceController.php
...trollers/OPNsense/CaptivePortal/Api/ServiceController.php
+2
-6
NetworkinsightController.php
...ers/OPNsense/Diagnostics/Api/NetworkinsightController.php
+2
-5
No files found.
src/opnsense/mvc/app/controllers/OPNsense/CaptivePortal/Api/ServiceController.php
View file @
a0e9f738
...
@@ -105,12 +105,8 @@ class ServiceController extends ApiControllerBase
...
@@ -105,12 +105,8 @@ class ServiceController extends ApiControllerBase
$result
=
json_decode
(
$response
,
true
);
$result
=
json_decode
(
$response
,
true
);
if
(
$result
!=
null
)
{
if
(
$result
!=
null
)
{
$response
=
$result
[
'payload'
];
$response
=
$result
[
'payload'
];
$this
->
response
->
setContentType
(
'application/octet-stream'
,
'UTF-8'
);
$this
->
response
->
setRawHeader
(
"Content-Type: application/octet-stream"
);
$this
->
response
->
setHeader
(
$this
->
response
->
setRawHeader
(
"Content-Disposition: attachment; filename=template_"
.
$templateFileId
.
".zip"
);
'Content-Disposition:'
,
"Attachment; filename=
\"
template_"
.
$templateFileId
.
".zip
\"
"
);
$this
->
response
->
setHeader
(
'Content-Type:'
,
'application/zip'
);
return
base64_decode
(
$response
);
return
base64_decode
(
$response
);
}
else
{
}
else
{
// return empty response on error
// return empty response on error
...
...
src/opnsense/mvc/app/controllers/OPNsense/Diagnostics/Api/NetworkinsightController.php
View file @
a0e9f738
...
@@ -259,11 +259,8 @@ class NetworkinsightController extends ApiControllerBase
...
@@ -259,11 +259,8 @@ class NetworkinsightController extends ApiControllerBase
$to_date
=
null
,
$to_date
=
null
,
$resolution
=
null
$resolution
=
null
)
{
)
{
$this
->
response
->
setContentType
(
'application/CSV'
,
'UTF-8'
);
$this
->
response
->
setRawHeader
(
"Content-Type: application/octet-stream"
);
$this
->
response
->
setHeader
(
$this
->
response
->
setRawHeader
(
"Content-Disposition: attachment; filename="
.
$provider
.
".csv"
);
'Content-Disposition:'
,
"Attachment; filename=
\"
"
.
$provider
.
".csv
\"
"
);
if
(
$this
->
request
->
isGet
())
{
if
(
$this
->
request
->
isGet
())
{
$backend
=
new
Backend
();
$backend
=
new
Backend
();
$configd_cmd
=
"netflow aggregate export
{
$provider
}
{
$from_date
}
{
$to_date
}
{
$resolution
}
"
;
$configd_cmd
=
"netflow aggregate export
{
$provider
}
{
$from_date
}
{
$to_date
}
{
$resolution
}
"
;
...
...
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