Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
freyacodes committed Jul 31, 2019
2 parents 1033d34 + 81804be commit d9c9aa0
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
12 changes: 11 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,18 @@
Each release usually includes various fixes and improvements.
The most noteworthy of these, as well as any features and breaking changes, are listed here.

## v3.2.1
## v3.2.1.1
* Updated Lavaplayer to 1.3.19. This release includes a patch which fixes loading youtube URLs.
https://github.com/sedmelluq/lavaplayer/pull/199
* Made the WebSocket handshake return code 401 instead of 200 on bad auth. #208

Contributors:
[@Frederikam](https://github.com/Frederikam) and
[@Devoxin](https://github.com/Devoxin)



## v3.2.1
* Update dependencies -- fixes frequent youtube HTTP errors
* Return `FriendlyException` message on `LOAD_FAILED` #174
* Add option to disable `ytsearch` and `scsearch` #194
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import lavalink.server.config.ServerConfig
import org.slf4j.Logger
import org.slf4j.LoggerFactory
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.http.HttpStatus
import org.springframework.http.server.ServerHttpRequest
import org.springframework.http.server.ServerHttpResponse
import org.springframework.stereotype.Controller
Expand All @@ -26,15 +27,14 @@ constructor(private val serverConfig: ServerConfig, private val socketServer: So
*/
override fun beforeHandshake(request: ServerHttpRequest, response: ServerHttpResponse, wsHandler: WebSocketHandler,
attributes: Map<String, Any>): Boolean {
response.headers.add("Lavalink-Major-Version", "3")

val password = request.headers.getFirst("Authorization")
val matches = password == serverConfig.password

if (matches) {
log.info("Incoming connection from " + request.remoteAddress)
} else {
log.error("Authentication failed from " + request.remoteAddress)
response.setStatusCode(HttpStatus.UNAUTHORIZED)
}

val resumeKey = request.headers.getFirst("Resume-Key")
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ subprojects {
ext {
//@formatter:off

lavaplayerVersion = '1.3.17'
lavaplayerVersion = '1.3.19'
magmaVersion = '0.9.0'
jdaNasVersion = '1.0.6'
jappVersion = '1.3'
Expand Down

0 comments on commit d9c9aa0

Please sign in to comment.