2021-10-10から1日間の記事一覧

セッションハイジャック

ユーザーのセッションIDが盗まれると、攻撃者がそのユーザーをかたってアプリケーションを利用できてしまう。 Railsでの対策 SSL接続を強制する。 Rails.application.configure do config.force_ssl = true end

$listeners ~孫→子→親の2連続$emitの代わりに~

ParentComponent <ChildComponent @parentMethod="updateMessage"></ChildComponent> ChildComponent <GrandChildComponent @childMethod="$listeners['parentMethod']" ></GrandChildComponent> GrandChildComponent methods: { this.$emit('childMethod', this.message) }

【Rails+Vue】jwtによるトークン認証

認証におけるjwtのメリット CORSなどの制約がない 異なるドメイン間の通信を拒否する制約にかからない スケーラブルである cookie認証の場合はセッションを保持する別のサーバーやDBが必要になる。jwt認証の場合はアプリケーションサーバーのみで認証ができ…