Fix captcha cache control bug (#2326)

Co-authored-by: SleeplessOne1917 <insomnia-void@protonmail.com>
This commit is contained in:
SleeplessOne1917 2024-01-15 14:37:12 +00:00 committed by GitHub
parent 909e3e0fa8
commit 59308bd7ae
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -71,9 +71,13 @@ export class Signup extends Component<any, State> {
async fetchCaptcha() {
this.setState({ captchaRes: LOADING_REQUEST });
HttpService.client.setHeaders({
"Cache-Control": "private, no-cache",
});
this.setState({
captchaRes: await HttpService.client.getCaptcha(),
});
HttpService.client.setHeaders({});
this.setState(s => {
if (s.captchaRes.state === "success") {