Skip to content

Commit

Permalink
Resolving hardcoded secrets
Browse files Browse the repository at this point in the history
Resolves hardcoded secrets.
  • Loading branch information
mys721tx committed Dec 28, 2024
1 parent dec3ffa commit 5cc2594
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/controllers/articles_controller.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
class ArticlesController < ApplicationController
http_basic_authenticate_with name: "dhh", password: "secret", except: [ :index, :show ]
http_basic_authenticate_with name: ENV["BASIC_AUTH_NAME"], password: ENV["BASIC_AUTH_PASSWORD"], only: :destroy

def index
@articles = Article.all
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/comments_controller.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
class CommentsController < ApplicationController
http_basic_authenticate_with name: "dhh", password: "secret", only: :destroy
http_basic_authenticate_with name: ENV["BASIC_AUTH_NAME"], password: ENV["BASIC_AUTH_PASSWORD"], only: :destroy

def create
@article = Article.find(params[:article_id])
Expand Down

0 comments on commit 5cc2594

Please sign in to comment.