mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-21 03:36:06 +00:00
Add origin/host validation and warning for exposed serves (#1270)
This commit is contained in:
parent
444dc11b26
commit
ac6941f054
10 changed files with 852 additions and 11 deletions
|
|
@ -290,6 +290,13 @@ impl ErrorResponse {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn forbidden<S: Into<String>>(details: S) -> Self {
|
||||
Self {
|
||||
kind: ErrorResponseKind::Forbidden,
|
||||
details: details.into(),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn internal_error<S: Into<String>>(details: S) -> Self {
|
||||
Self {
|
||||
kind: ErrorResponseKind::InternalError,
|
||||
|
|
@ -302,5 +309,6 @@ impl ErrorResponse {
|
|||
pub enum ErrorResponseKind {
|
||||
NotFound,
|
||||
BadRequest,
|
||||
Forbidden,
|
||||
InternalError,
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue