
上星期五,我遇到了一個緊急問題,我的港鐵實時列車時刻表頁面除了輕鐵外都無法正常運作,前一天我還收到了一位用戶的報告。經過調查,我檢查了瀏覽器的網絡連接,發現港鐵數據伺服器移除了跨源標頭設置(cross origin header)。這一變更導致我的港鐵實時服務頁面和另一位開發者的hkbus.app都無法準確顯示實時時刻表。
考慮到這個問題的影響,我向香港政府的 data.gov.hk 團隊和香港鐵路有限公司的開放數據團隊提交了兩份投訴。對於用戶來說,擁有可靠的實時交通資訊至關重要,我希望這個問題能夠迅速得到解決,以造福所有人。
開放數據 – 港鐵實時列車服務資訊
https://data.gov.hk/tc-data/dataset/mtr-data2-nexttrain-data
標題:Urgent: Issue with Cross-Origin Access to MTR Real-Time Train Service Data
Dear Data.gov.hk & MTR open data Team,
I hope this message finds you well. I am writing to express my concern regarding the recent changes to the MTR open data concerning real-time train services [1]. It appears that access to this data has suddenly restricted cross-origin requests, which significantly impacts developers and organizations relying on this data for various applications.
The ability to access real-time train service data is crucial for creating tools that enhance public transportation experiences for users. This change not only disrupts existing applications but also hinders innovation and the development of new solutions that could benefit the community and improve the overall efficiency of public transport.
I kindly ask for clarification on this issue and any potential steps that can be taken to restore cross-origin access. Ensuring that developers can freely access this data is essential for fostering a collaborative environment that promotes the use of public data for the common good.
I will also follow up this situation on my blog [2] and social network.
Thank you for your attention to this matter. I look forward to your prompt response.
Best regards,
Sammy Fung
President, Open Source Hong Kong.
[1] Real-time MTR train information: https://data.gov.hk/en-data/dataset/mtr-data2-nexttrain-data
[2] Follow up blog post on sammy.hk: https://sammy.hk/en/urgent-issue-with-cross-origin-access-to-mtr-real-time-train-service-data/
更新於3月10日:問題已解決
🚨 更新:好消息!今天 (3月10日) 下午,MTR 陸續恢復添加 Access-Control-Allow-Origin: * 標頭,重新允許跨來源請求。這一改變將促進創新,並幫助開發者創建更好的公共交通應用程式,讓即時 MTR 列車時間表更新再次正常運作。讓我們繼續支持開放數據!#開放數據 #MTR