Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
cs_comments_service
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
cs_comments_service
Commits
beacc73f
Commit
beacc73f
authored
Oct 11, 2013
by
Greg Price
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #59 from edx/gprice/header-auth
Allow authentication by HTTP header
parents
6b31385f
cf39aabd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletions
+2
-1
app.rb
+2
-1
No files found.
app.rb
View file @
beacc73f
...
@@ -61,7 +61,8 @@ DEFAULT_PER_PAGE = 20
...
@@ -61,7 +61,8 @@ DEFAULT_PER_PAGE = 20
if
RACK_ENV
.
to_s
!=
"test"
# disable api_key auth in test environment
if
RACK_ENV
.
to_s
!=
"test"
# disable api_key auth in test environment
before
do
before
do
error
401
unless
params
[
:api_key
]
==
CommentService
.
config
[
:api_key
]
api_key
=
CommentService
.
config
[
:api_key
]
error
401
unless
params
[
:api_key
]
==
api_key
or
env
[
"HTTP_X_EDX_API_KEY"
]
==
api_key
end
end
end
end
...
...
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