Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
freyacodes committed Nov 11, 2018
2 parents 68f551b + 2279ca9 commit ee0ccda
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 0 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,18 @@ Contributors:
[@Frederikam](https://github.com/Frederikam/),
[@calebj](https://github.com/calebj)

## v3.1.2
* Add API version header to all responses

Contributor:
[@Devoxin](https://github.com/Devoxin)

## v3.1.1
* Add equalizer support

Contributor:
[@Devoxin](https://github.com/Devoxin)

## v3.1
* Replaced JDAA with Magma
* Added an event for when the Discord voice WebSocket is closed
Expand Down
2 changes: 2 additions & 0 deletions IMPLEMENTATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,8 @@ Additionally, in every `/loadtracks` response, a `loadType` property is returned
* `NO_MATCHES` - Returned if no matches/sources could be found for a given identifier.
* `LOAD_FAILED` - Returned if Lavaplayer failed to load something for some reason.

All REST responses from Lavalink include a `Lavalink-Api-Version` header.

### Special notes
* When your shard's mainWS connection dies, so does all your lavalink audio connections.
* This also includes resumes
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package lavalink.server.io;

import org.springframework.stereotype.Component;
import org.springframework.web.filter.OncePerRequestFilter;

import javax.servlet.FilterChain;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

@Component
public class ResponseHeaderFilter extends OncePerRequestFilter {

@Override
protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response,
FilterChain filterChain) throws IOException, ServletException {
response.addHeader("Lavalink-Api-Version", "3");
filterChain.doFilter(request, response);
}
}

0 comments on commit ee0ccda

Please sign in to comment.