Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Tenzing
/
pdf-customizer
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
28ab56c7
authored
2016-05-12 14:50:51 -0400
by
Jeff Balicki
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
3
1 parent
cce8685c
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
app/Http/Controllers/ApiController.php
app/Http/Controllers/ApiController.php
View file @
28ab56c
...
...
@@ -132,12 +132,18 @@ class ApiController extends Controller
$pdfId
=
new
pdfModel
();
$pdfId
=
$pdfId
->
changePdf
(
$apiCallId
,
$json
);
// ALLOW OPTIONS METHOD
$headers
=
[
'Access-Control-Allow-Origin'
=>
'*'
,
'Access-Control-Allow-Methods'
=>
'POST, GET, OPTIONS, PUT, DELETE'
,
'Access-Control-Allow-Headers'
=>
'Content-Type, X-Auth-Token, Origin'
];
$pdf
=
new
PdfController
();
$pdf
=
$pdf
->
pdf
(
$pdfId
);
$response
=
$pdf
;
$statusCode
=
200
;
return
Response
::
json
(
$response
,
$statusCode
)
->
header
(
"Access-Control-Allow-Origin"
,
"*"
);
return
Response
::
json
(
$response
,
$statusCode
,
$headers
);
}
...
...
Please
register
or
sign in
to post a comment