3
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Elastic Beanstalk(Java) + Spring Boot + https

Last updated at Posted at 2019-07-20

1. やりたいこと

  • Elastic BeanstalkのJavaプラットフォームでSpring Bootを動かすときにhttpsで接続する

2. 前提

  • LBでhttpsリスナーを設定済み
  • 以下のような通信経路
LB(443) <-> Nginx(80) <-> Spring Boot(5000)

3. やったこと

server.tomcat.remote-ip-header=x-forwarded-for
server.tomcat.protocol-header=x-forwarded-proto
  • 環境変数の場合は以下のように設定する
SERVER_TOMCAT_REMOTE_IP_HEADER=x-forwarded-for
SERVER_TOMCAT_PROTOCOL_HEADER=x-forwarded-proto

3.1. なにもしなかったら...

  • リダイレクトのときにhttpになってしまう
  • 認証後のページリダイレクトとか
  • PRGしたページとか

4. おまけ

おわり。

3
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?