Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
elphel-apps-autocampars
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Elphel
elphel-apps-autocampars
Commits
9913842a
Commit
9913842a
authored
Jun 06, 2022
by
Andrey Filippov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added Access-Control-Allow-Origin
parent
c428b27f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
0 deletions
+2
-0
autocampars.php
src/autocampars.php
+2
-0
No files found.
src/autocampars.php
View file @
9913842a
...
@@ -1734,6 +1734,7 @@ function respond_xml($result,$error=null,$color_mode = 3){ // default white bold
...
@@ -1734,6 +1734,7 @@ function respond_xml($result,$error=null,$color_mode = 3){ // default white bold
$xml
->
addChild
(
'error'
,
'"'
.
$error
.
'"'
);
$xml
->
addChild
(
'error'
,
'"'
.
$error
.
'"'
);
}
}
$rslt
=
$xml
->
asXML
();
$rslt
=
$xml
->
asXML
();
header
(
'Access-Control-Allow-Origin: *'
);
header
(
"Content-Type: text/xml"
);
header
(
"Content-Type: text/xml"
);
header
(
"Content-Length: "
.
strlen
(
$rslt
)
.
"
\n
"
);
header
(
"Content-Length: "
.
strlen
(
$rslt
)
.
"
\n
"
);
header
(
"Pragma: no-cache
\n
"
);
header
(
"Pragma: no-cache
\n
"
);
...
@@ -2102,6 +2103,7 @@ function reboot_me(){
...
@@ -2102,6 +2103,7 @@ function reboot_me(){
if
(
array_key_exists
(
'reboot'
,
$_GET
))
{
if
(
array_key_exists
(
'reboot'
,
$_GET
))
{
// TODO: change the response to respond_xml()
// TODO: change the response to respond_xml()
$rslt
=
"<?xml version=
\"
1.0
\"
?><root><reboot>Rebooting standalone camera...</reboot></root>
\n
"
;
$rslt
=
"<?xml version=
\"
1.0
\"
?><root><reboot>Rebooting standalone camera...</reboot></root>
\n
"
;
header
(
'Access-Control-Allow-Origin: *'
);
header
(
"Content-Type: text/xml"
);
header
(
"Content-Type: text/xml"
);
header
(
"Content-Length: "
.
strlen
(
$rslt
)
.
"
\n
"
);
header
(
"Content-Length: "
.
strlen
(
$rslt
)
.
"
\n
"
);
header
(
"Pragma: no-cache
\n
"
);
header
(
"Pragma: no-cache
\n
"
);
...
...
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