package cn.quant.baa.pay.rest;

import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

/**
 * Created by Administrator on 2021/9/28 0028.
 */
@RestController
@RequestMapping("/tech")
public class TechController extends BusinessController{

    @RequestMapping("ipv4")
    public String ipv4(HttpServletRequest request) {
        return "var CLIENT_IP=\"" + getClientAddress(request) + "\";";
    }

    @RequestMapping("/health/check")
    public ResponseEntity checkHealth() throws Exception {
        return ResponseEntity.ok("ok");
    }
}
