[PR #4462] [MERGED] Make HSTS policy configurable if https is enabled #5700

Closed
opened 2026-11-02 04:03:26 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/MHSanaei/3x-ui/pull/4462
Author: @kayukin
Created: 5/18/2026
Status: ✅ Merged
Merged: 5/19/2026
Merged by: @MHSanaei

Base: main ← Head: configurable-hsts


📝 Commits (3)

  • 1120627 Make HSTS policy configurable if https is enabled
  • ef1fa9c Merge branch 'main' into configurable-hsts
  • 46afac8 refactor(web): gate HSTS at call site so XUI_SKIP_HSTS doesn't drop the Secure cookie flag

📊 Changes

2 files changed (+7 additions, -1 deletions)

View changed files

📝 config/config.go (+5 -0)
📝 web/web.go (+2 -1)

📄 Description

What is the pull request?

Fixes the issue introduced in https://github.com/MHSanaei/3x-ui/pull/4179. If other sites are hosted on the same domain as 3x-ui (on different ports), they will all receive forced https.

Which part of the application is affected by the change?

  • Frontend
  • Backend

Type of Changes

  • Bug fix
  • New feature
  • Refactoring
  • Other

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/MHSanaei/3x-ui/pull/4462 **Author:** [@kayukin](https://github.com/kayukin) **Created:** 5/18/2026 **Status:** ✅ Merged **Merged:** 5/19/2026 **Merged by:** [@MHSanaei](https://github.com/MHSanaei) **Base:** `main` ← **Head:** `configurable-hsts` --- ### 📝 Commits (3) - [`1120627`](https://github.com/MHSanaei/3x-ui/commit/1120627cd55ef8100946e51ec83fbff1a8e5cf2b) Make HSTS policy configurable if https is enabled - [`ef1fa9c`](https://github.com/MHSanaei/3x-ui/commit/ef1fa9cc55e804e8f66de16ebb15ade4fb5760ff) Merge branch 'main' into configurable-hsts - [`46afac8`](https://github.com/MHSanaei/3x-ui/commit/46afac822842382b2bf51298b3d33c2185443e86) refactor(web): gate HSTS at call site so XUI_SKIP_HSTS doesn't drop the Secure cookie flag ### 📊 Changes **2 files changed** (+7 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `config/config.go` (+5 -0) 📝 `web/web.go` (+2 -1) </details> ### 📄 Description ## What is the pull request? Fixes the issue introduced in https://github.com/MHSanaei/3x-ui/pull/4179. If other sites are hosted on the same domain as 3x-ui (on different ports), they will all receive forced https. ## Which part of the application is affected by the change? - [ ] Frontend - [x] Backend ## Type of Changes - [x] Bug fix - [ ] New feature - [ ] Refactoring - [ ] Other --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-02 04:03:26 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
MHSanaei/3x-ui#5700
No description provided.