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
c9615121
authored
2016-05-12 15:42:56 -0400
by
Jeff Balicki
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
e
1 parent
98efbb3f
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
4 deletions
app/Http/Middleware/Cors.php
app/Http/Middleware/Cors.php
View file @
c961512
<?php
namespace
App\Http\Middleware
;
use
Closure
;
use
Illuminate\Contracts\Routing\Middleware
;
use
Illuminate\Session\TokenMismatchException
;
class
Cors
implements
Middleware
{
class
Cors
{
public
function
handle
(
$request
,
Closure
$next
)
{
return
$next
(
$request
)
->
header
(
'Access-Control-Allow-Origin'
,
'*'
)
->
header
(
'Access-Control-Allow-Methods'
,
'GET, POST, PUT, DELETE, OPTIONS'
);
$response
=
$next
(
$request
);
$response
->
headers
->
set
(
'Access-Control-Allow-Origin'
,
'*'
)
->
header
(
'Access-Control-Allow-Methods'
,
'GET, POST, PUT, DELETE, OPTIONS'
);
return
$response
;
}
}
...
...
Please
register
or
sign in
to post a comment