Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
Rocket.Chat
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
RocketChat
Rocket.Chat
Commits
b2f18455
Commit
b2f18455
authored
9 years ago
by
Rodrigo Nascimento
Browse files
Options
Downloads
Patches
Plain Diff
Fix language loading from cordova
parent
4c5669a9
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
packages/rocketchat-cors/cors.coffee
+8
-0
8 additions, 0 deletions
packages/rocketchat-cors/cors.coffee
with
8 additions
and
0 deletions
packages/rocketchat-cors/cors.coffee
+
8
−
0
View file @
b2f18455
...
@@ -4,6 +4,14 @@ WebApp.rawConnectHandlers.use (req, res, next) ->
...
@@ -4,6 +4,14 @@ WebApp.rawConnectHandlers.use (req, res, next) ->
res
.
setHeader
(
"Access-Control-Allow-Origin"
,
"*"
)
res
.
setHeader
(
"Access-Control-Allow-Origin"
,
"*"
)
res
.
setHeader
(
"X-Rocket-Chat-Version"
,
VERSION
)
res
.
setHeader
(
"X-Rocket-Chat-Version"
,
VERSION
)
res
.
setHeader
(
"Access-Control-Expose-Headers"
,
"X-Rocket-Chat-Version"
)
res
.
setHeader
(
"Access-Control-Expose-Headers"
,
"X-Rocket-Chat-Version"
)
# Block next handlers to override CORS with value http://meteor.local
setHeader
=
res
.
setHeader
res
.
setHeader
=
(
key
,
val
)
->
if
key
.
toLowerCase
()
is
'access-control-allow-origin'
and
val
is
'http://meteor.local'
return
return
setHeader
.
apply
@
,
arguments
return
next
()
return
next
()
_staticFilesMiddleware
=
WebAppInternals
.
staticFilesMiddleware
_staticFilesMiddleware
=
WebAppInternals
.
staticFilesMiddleware
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment