3
Help us understand the problem. What are the problem?

More than 1 year has passed since last update.

posted at

updated at

Organization

Elastic Beanstalk(Java) + Spring Boot + https

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. おまけ

おわり。

Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
3
Help us understand the problem. What are the problem?