跳转到内容
View in the app

A better way to browse. Learn more.

彼岸论坛

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
欢迎抵达彼岸 彼岸花开 此处谁在 -彼岸论坛

[程序员] 乐了,全 post 接口设计意想不到的妙用

发表于
某个老项目,只有一两个陈年接口是 get ,其余全是 post 。

一日,项目部署到某台海外服务器上,前端老哥跑来说,get 这个接口调不通,总是 301 重定向。

这个项目中间七弯八绕的,我们烧了好久的脑,也不能明白为什么。

最后还是前端老哥拿浏览器访问了一下接口,原来重定向到了国家反诈中心—运营商不支持域名代理到海外的 IP ,然后我们的 API 刚好又是域名访问。

原来是我们一直用 post only api ,所以无意间避开了这个问题…偶然间有一个 get ,我们才明白过来,还有这种事。

===

重定向的反诈中心页面是 http ,chrome 地址栏有一个大大的“不安全”标记。

这个标记让这件事的好笑程度又提升了很多。

Featured Replies

No posts to show

创建帐户或登录来提出意见

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.