Skip to content

Commit 8e6f862

Browse files
committed
enable "Access-Control-Allow-Origin" in request
1 parent a5560af commit 8e6f862

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

example/app.js

+5
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@ app.configure(function(){
1919
app.use(express.logger('dev'));
2020
app.use(express.bodyParser());
2121
app.use(express.methodOverride());
22+
app.all('/*', function(req, res, next) {
23+
res.header('Access-Control-Allow-Origin', '*');
24+
next();
25+
});
26+
2227
app.use(swagger.init(app, {
2328
apiVersion: '1.0',
2429
swaggerVersion: '1.0',

0 commit comments

Comments
 (0)