OPNsense
  • Home
  • Help
  • Search
  • Login
  • Register

  • OPNsense Forum »
  • English Forums »
  • Development and Code Review (Moderator: fabian) »
  • nginx - HSTS
« previous next »
  • Print
Pages: [1]

Author Topic: nginx - HSTS  (Read 4787 times)

Oxima69

  • Newbie
  • *
  • Posts: 23
  • Karma: 0
    • View Profile
nginx - HSTS
« on: March 29, 2019, 09:27:07 am »
Hi,

Since version 1.8
Quote
HSTS not sent automatically anymore if HTTP over TLS is configured (still available via security header)

I guess there's a little problem here.

after activation via security header the nginx.conf has the following entry

Code: [Select]
add_header Strict-Transport-Security "15768000" always;
max-age is missing ?

it should be

Code: [Select]
add_header Strict-Transport-Security "max-age=15768000" always;
Or do I get something wrong......
« Last Edit: March 29, 2019, 10:36:42 am by Oxima69 »
Logged

fabian

  • Moderator
  • Hero Member
  • *****
  • Posts: 2769
  • Karma: 200
  • OPNsense Contributor (Language, VPN, Proxy, etc.)
    • View Profile
    • Personal Homepage
Re: nginx - HSTS
« Reply #1 on: March 29, 2019, 05:36:31 pm »
that's a bug which I will fix
Logged

fabian

  • Moderator
  • Hero Member
  • *****
  • Posts: 2769
  • Karma: 200
  • OPNsense Contributor (Language, VPN, Proxy, etc.)
    • View Profile
    • Personal Homepage
Re: nginx - HSTS
« Reply #2 on: March 29, 2019, 05:59:27 pm »
You can install the patch from here: https://github.com/opnsense/plugins/pull/1284/files

opnsense-patch -c plugins 7ed13346710a56ec504d114c102e34f7f4d35253
Logged

Oxima69

  • Newbie
  • *
  • Posts: 23
  • Karma: 0
    • View Profile
Re: nginx - HSTS
« Reply #3 on: April 01, 2019, 09:52:37 am »
Great,
it works.
Logged

Oxima69

  • Newbie
  • *
  • Posts: 23
  • Karma: 0
    • View Profile
Re: nginx - HSTS
« Reply #4 on: April 01, 2019, 09:59:25 am »
maybe in this context.
there is a little cosmetic error.

when activating the security headers.
you have 2 entries of

Code: [Select]
proxy_hide_header Strict-Transport-Security;
Logged

fabian

  • Moderator
  • Hero Member
  • *****
  • Posts: 2769
  • Karma: 200
  • OPNsense Contributor (Language, VPN, Proxy, etc.)
    • View Profile
    • Personal Homepage
Re: nginx - HSTS
« Reply #5 on: April 01, 2019, 09:44:52 pm »
use the same command with 26fff9cdd527988c2d147d81e1a8f1f3f02dcd54 and it should be gone.

https://github.com/opnsense/plugins/pull/1288/commits/26fff9cdd527988c2d147d81e1a8f1f3f02dcd54
Logged

Oxima69

  • Newbie
  • *
  • Posts: 23
  • Karma: 0
    • View Profile
Re: nginx - HSTS
« Reply #6 on: April 02, 2019, 12:31:16 pm »
Great,
it works.
Logged

fabian

  • Moderator
  • Hero Member
  • *****
  • Posts: 2769
  • Karma: 200
  • OPNsense Contributor (Language, VPN, Proxy, etc.)
    • View Profile
    • Personal Homepage
Re: nginx - HSTS
« Reply #7 on: April 02, 2019, 06:02:28 pm »
Good to know that it works. Will be in the next release.
Logged

  • Print
Pages: [1]
« previous next »
  • OPNsense Forum »
  • English Forums »
  • Development and Code Review (Moderator: fabian) »
  • nginx - HSTS
 

OPNsense is an OSS project © Deciso B.V. 2015 - 2024 All rights reserved
  • SMF 2.0.19 | SMF © 2021, Simple Machines
    Privacy Policy
    | XHTML | RSS | WAP2