👌 修复getStatus Post跨域

This commit is contained in:
jimlee 2023-01-28 17:19:08 +08:00
parent 9d46bd5676
commit 410fa7a54f

View File

@ -25,7 +25,7 @@ import javax.servlet.http.HttpServletResponse
@SpringBootApplication
open class EmbyLisenceServerApplication
class EmbyLisenceServerApplication
fun main(args: Array<String>) {
runApplication<EmbyLisenceServerApplication>(*args)
@ -33,30 +33,23 @@ fun main(args: Array<String>) {
@RequestMapping("/admin/service/registration")
@RestController
@CrossOrigin
class LisenceController {
@RequestMapping("validateDevice")
@RequestMapping("validateDevice", "validateDevice.php")
fun validateDevice(): Device {
return Device()
}
@GetMapping("getStatus")
@RequestMapping("getStatus", "getStatus.php")
fun getStatus(): Status {
return Status()
}
@RequestMapping("validate")
@RequestMapping("validate", "validate.php")
fun validate(): Validate {
return Validate()
}
@RequestMapping("validate.php")
fun validatePhp(): Validate {
return Validate(
""
)
}
}
data class Device(
@ -91,7 +84,7 @@ data class Validate(
@Order(Ordered.HIGHEST_PRECEDENCE)
@ControllerAdvice
@RequestMapping("/error")
open class ExtendExceptionHandler(errorAttributes: ErrorAttributes) : AbstractErrorController(errorAttributes) {
class ExtendExceptionHandler(errorAttributes: ErrorAttributes) : AbstractErrorController(errorAttributes) {
/**
* 参数断言异常