Skip to content

Conversation

@Vudangkhoa0910
Copy link
Contributor

@Vudangkhoa0910 Vudangkhoa0910 commented Dec 10, 2025

Mục đích

Thay thế thư viện react-leaflet (giấy phép Hippocratic-2.1 - KHÔNG phải mã nguồn mở) bằng custom React wrapper sử dụng Leaflet thuần (BSD-2-Clause - mã nguồn mở hoàn toàn).

Vấn đề

Thư viện [email protected] sử dụng giấy phép Hippocratic License 2.1, đây là giấy phép:

  • Không được OSI (Open Source Initiative) công nhận
  • Có các điều khoản hạn chế sử dụng
  • Không phù hợp cho cuộc thi Phần mềm nguồn mở OLP 2025

Giải pháp

Tạo custom React wrapper (LeafletReactWrapper.tsx) sử dụng trực tiếp thư viện Leaflet (BSD-2-Clause):

Bảng giấy phép sau thay đổi

Thư viện Phiên bản Giấy phép Trạng thái
Leaflet 1.9.4 BSD-2-Clause OSS
leaflet.markercluster 1.5.3 MIT OSS

@netlify
Copy link

netlify bot commented Dec 10, 2025

Deploy Preview for citylensadmin ready!

Name Link
🔨 Latest commit 61fe723
🔍 Latest deploy log https://app.netlify.com/projects/citylensadmin/deploys/693a306d440f8e000886ab60
😎 Deploy Preview https://deploy-preview-22--citylensadmin.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify
Copy link

netlify bot commented Dec 10, 2025

Deploy Preview for citylensapp ready!

Name Link
🔨 Latest commit 0160003
🔍 Latest deploy log https://app.netlify.com/projects/citylensapp/deploys/6939b65bdbc046000878dbdd
😎 Deploy Preview https://deploy-preview-22--citylensapp.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify
Copy link

netlify bot commented Dec 10, 2025

Deploy Preview for citylensuser ready!

Name Link
🔨 Latest commit bf97d07
🔍 Latest deploy log https://app.netlify.com/projects/citylensuser/deploys/693a0636249c4e0008bdec8a
😎 Deploy Preview https://deploy-preview-22--citylensuser.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

- Remove forceHttps helper from all service files (auth, reports, alerts, comments, aiChat, traffic, weather)
- Remove forceHttps from env.ts
- Update .env to use HTTP for Cloudflare tunnel URLs (prevents redirect during CORS preflight)
- Add http://localhost:8081 to backend CORS allowed origins
- Update web-dashboard production env with new Cloudflare tunnel URL

This fixes CORS preflight redirect errors when web-app accesses backend via Cloudflare tunnel
@Vudangkhoa0910 Vudangkhoa0910 changed the title fix(web-app): always upgrade HTTP to HTTPS for non-localhost URLs refactor(web-dashboard): Replace react-leaflet with pure Leaflet wrapper for OSS compliance Dec 11, 2025
@Vudangkhoa0910 Vudangkhoa0910 merged commit 0cba08a into main Dec 11, 2025
8 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants