summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
author_Tradam <[email protected]>2024-06-17 00:44:10 -0400
committer_Tradam <[email protected]>2024-06-17 00:44:10 -0400
commitc0faec4aaf819017f5c4f1083816aaad026e5ccc (patch)
treec9e1694f8823cf035fe740ff7ec656fc1d01bf23
parent40860b70a2ffb58636b3bf6e6399f30e08eafec4 (diff)
downloadgameHolster-c0faec4aaf819017f5c4f1083816aaad026e5ccc.tar.gz
gameHolster-c0faec4aaf819017f5c4f1083816aaad026e5ccc.zip
test automated deployment
-rw-r--r--app/controllers/api/v1/auth_controller.rb1
-rw-r--r--app/controllers/application_controller.rb7
-rw-r--r--config/initializers/cors.rb2
3 files changed, 1 insertions, 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,