From c0faec4aaf819017f5c4f1083816aaad026e5ccc Mon Sep 17 00:00:00 2001 From: _Tradam Date: Mon, 17 Jun 2024 00:44:10 -0400 Subject: test automated deployment --- app/controllers/api/v1/auth_controller.rb | 1 - app/controllers/application_controller.rb | 7 ------- config/initializers/cors.rb | 2 +- 3 files changed, 1 insertion(+), 9 deletions(-) diff --git a/app/controllers/api/v1/auth_controller.rb b/app/controllers/api/v1/auth_controller.rb index f0cad2a..3a248cd 100644 --- a/app/controllers/api/v1/auth_controller.rb +++ b/app/controllers/api/v1/auth_controller.rb @@ -2,7 +2,6 @@ require 'net/http' require 'bcrypt' class Api::V1::AuthController < ApplicationController - before_action :cors_accept class << self end diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 427556c..31e16d7 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -1,11 +1,4 @@ class ApplicationController < ActionController::API include ActionController::Cookies include ActionController::RequestForgeryProtection - - def cors_accept - headers['Access-Control-Allow-Origin'] = '*' - headers['Access-Control-Allow-Methods'] = 'POST, PUT, DELETE, GET, OPTIONS' - headers['Access-Control-Request-Method'] = '*' - headers['Access-Control-Allow-Headers'] = 'Origin, X-Requested-With, Content-Type, Accept, Authorization' - end end diff --git a/config/initializers/cors.rb b/config/initializers/cors.rb index 30f03cc..541e2ed 100644 --- a/config/initializers/cors.rb +++ b/config/initializers/cors.rb @@ -17,7 +17,7 @@ Rails.application.config.middleware.insert_before 0, Rack::Cors do allow do - origins 'localhost:3000', 'localhost:5173' + origins 'localhost:3000', 'localhost:5173', 'gameshoster.com', 'malcz.com' resource '/api/v1/*', headers: :any, -- cgit v1.2.3