aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/controllers/terraform_http_backend_controller.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/app/controllers/terraform_http_backend_controller.rb b/app/controllers/terraform_http_backend_controller.rb
index eeff7b0..9e38dc7 100644
--- a/app/controllers/terraform_http_backend_controller.rb
+++ b/app/controllers/terraform_http_backend_controller.rb
@@ -19,7 +19,11 @@
# <http://www.gnu.org/licenses/>.
class TerraformHttpBackendController < ApplicationController
- skip_before_action :verify_authenticity_token, only: %w(create show destroy)
+ # These controller methods are for use by Terraform
+ TERRAFORM_CONTROLLER_METHODS = %w(create show destroy)
+
+ skip_before_action :verify_authenticity_token, only: TERRAFORM_CONTROLLER_METHODS
+ skip_before_action :authenticate_user!, only: TERRAFORM_CONTROLLER_METHODS
def self.credentials
@_credentials ||= begin
@@ -38,7 +42,7 @@ class TerraformHttpBackendController < ApplicationController
http_basic_authenticate_with(
**credentials,
- only: %(create show destroy)
+ only: TERRAFORM_CONTROLLER_METHODS
)
def index