summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHombreLaser <sebastian-440@live.com>2023-05-27 22:41:09 -0600
committerHombreLaser <sebastian-440@live.com>2023-05-27 22:41:09 -0600
commite5f0f1808fb6401254299f7a920d21c3cd936c66 (patch)
tree5a210c7338e2ec82c8e8a9e406b8100a37660ae6
parent332feb3066c7e0fd497311424ffe12c557f49fdd (diff)
Actualiza polĂ­ticas CORS
-rw-r--r--config/initializers/cors.rb2
-rw-r--r--db/schema.rb6
2 files changed, 5 insertions, 3 deletions
diff --git a/config/initializers/cors.rb b/config/initializers/cors.rb
index bb5216b..0e2b530 100644
--- a/config/initializers/cors.rb
+++ b/config/initializers/cors.rb
@@ -8,7 +8,7 @@
Rails.application.config.middleware.insert_before 0, Rack::Cors do
allow do
- origins 'localhost:5173', '127.0.0.1:5173'
+ origins 'localhost:5173', '127.0.0.1:5173', 'silosneeded.com'
resource '*', headers: :any, methods: %i[get post put patch delete options head]
end
diff --git a/db/schema.rb b/db/schema.rb
index 5bb24ca..3b3485a 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -143,10 +143,10 @@ ActiveRecord::Schema[7.0].define(version: 2023_04_14_000904) do
end
create_table "user_account_addresses", charset: "utf8mb4", collation: "utf8mb4_general_ci", force: :cascade do |t|
+ t.bigint "user_account_id", null: false
+ t.bigint "address_id", null: false
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
- t.bigint "user_account_id"
- t.bigint "address_id"
t.index ["address_id", "user_account_id"], name: "index_user_account_addresses_on_address_id_and_user_account_id", unique: true
t.index ["address_id"], name: "index_user_account_addresses_on_address_id"
t.index ["user_account_id"], name: "index_user_account_addresses_on_user_account_id"
@@ -177,5 +177,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_04_14_000904) do
add_foreign_key "product_reviews", "products"
add_foreign_key "product_reviews", "user_accounts"
add_foreign_key "products", "companies"
+ add_foreign_key "user_account_addresses", "addresses"
+ add_foreign_key "user_account_addresses", "user_accounts"
add_foreign_key "user_accounts", "carts"
end