watermark stuff
This commit is contained in:
parent
c140052822
commit
5ea3bcc1dd
18 changed files with 65 additions and 46 deletions
|
@ -1,4 +1,5 @@
|
||||||
package stirling.software.SPDF.config;
|
package stirling.software.SPDF.config;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.regex.Matcher;
|
import java.util.regex.Matcher;
|
||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
|
@ -20,13 +21,14 @@ import jakarta.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
import org.springframework.web.servlet.HandlerInterceptor;
|
import org.springframework.web.servlet.HandlerInterceptor;
|
||||||
import org.springframework.web.servlet.ModelAndView;
|
import org.springframework.web.servlet.ModelAndView;
|
||||||
public class CleanUrlInterceptor implements HandlerInterceptor {
|
|
||||||
|
|
||||||
|
public class CleanUrlInterceptor implements HandlerInterceptor {
|
||||||
|
|
||||||
private static final List<String> ALLOWED_PARAMS = Arrays.asList("lang", "endpoint", "endpoints");
|
private static final List<String> ALLOWED_PARAMS = Arrays.asList("lang", "endpoint", "endpoints");
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
|
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler)
|
||||||
|
throws Exception {
|
||||||
String queryString = request.getQueryString();
|
String queryString = request.getQueryString();
|
||||||
if (queryString != null && !queryString.isEmpty()) {
|
if (queryString != null && !queryString.isEmpty()) {
|
||||||
String requestURI = request.getRequestURI();
|
String requestURI = request.getRequestURI();
|
||||||
|
@ -45,8 +47,8 @@ public class CleanUrlInterceptor implements HandlerInterceptor {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// If there are any other query parameters besides the allowed ones
|
// If there are any parameters that are not allowed
|
||||||
if (parameters.size() > 0) {
|
if (parameters.size() != queryParameters.length) {
|
||||||
// Construct new query string
|
// Construct new query string
|
||||||
StringBuilder newQueryString = new StringBuilder();
|
StringBuilder newQueryString = new StringBuilder();
|
||||||
for (Map.Entry<String, String> entry : parameters.entrySet()) {
|
for (Map.Entry<String, String> entry : parameters.entrySet()) {
|
||||||
|
@ -66,10 +68,12 @@ public class CleanUrlInterceptor implements HandlerInterceptor {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler, ModelAndView modelAndView) {
|
public void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler,
|
||||||
|
ModelAndView modelAndView) {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex) {
|
public void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler,
|
||||||
|
Exception ex) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,7 +24,7 @@ close=\u0625\u063A\u0644\u0627\u0642
|
||||||
filesSelected = الملفات المحددة
|
filesSelected = الملفات المحددة
|
||||||
noFavourites = لم تتم إضافة أي مفضلات
|
noFavourites = لم تتم إضافة أي مفضلات
|
||||||
bored = الانتظار بالملل؟
|
bored = الانتظار بالملل؟
|
||||||
|
alphabet=\u0627\u0644\u0623\u0628\u062C\u062F\u064A\u0629
|
||||||
#############
|
#############
|
||||||
# HOME-PAGE #
|
# HOME-PAGE #
|
||||||
#############
|
#############
|
||||||
|
|
|
@ -20,6 +20,7 @@ close=Tanca
|
||||||
filesSelected=fitxers seleccionats
|
filesSelected=fitxers seleccionats
|
||||||
noFavourites=No s'ha afegit cap favorit
|
noFavourites=No s'ha afegit cap favorit
|
||||||
bored=Avorrit esperant?
|
bored=Avorrit esperant?
|
||||||
|
alphabet=Alfabet
|
||||||
#############
|
#############
|
||||||
# HOME-PAGE #
|
# HOME-PAGE #
|
||||||
#############
|
#############
|
||||||
|
|
|
@ -20,6 +20,7 @@ close=Schließen
|
||||||
filesSelected=Dateien ausgewählt
|
filesSelected=Dateien ausgewählt
|
||||||
noFavourites=Keine Favoriten hinzugefügt
|
noFavourites=Keine Favoriten hinzugefügt
|
||||||
bored=Gelangweiltes Warten?
|
bored=Gelangweiltes Warten?
|
||||||
|
alphabet=Alphabet
|
||||||
#############
|
#############
|
||||||
# HOME-PAGE #
|
# HOME-PAGE #
|
||||||
#############
|
#############
|
||||||
|
|
|
@ -20,6 +20,7 @@ close=Close
|
||||||
filesSelected=files selected
|
filesSelected=files selected
|
||||||
noFavourites=No favourites added
|
noFavourites=No favourites added
|
||||||
bored=Bored Waiting?
|
bored=Bored Waiting?
|
||||||
|
alphabet=Alphabet
|
||||||
#############
|
#############
|
||||||
# HOME-PAGE #
|
# HOME-PAGE #
|
||||||
#############
|
#############
|
||||||
|
|
|
@ -20,6 +20,7 @@ close=Cerrar
|
||||||
filesSelected=archivos seleccionados
|
filesSelected=archivos seleccionados
|
||||||
noFavourites=No se agregaron favoritos
|
noFavourites=No se agregaron favoritos
|
||||||
bored=¿Aburrido de esperar?
|
bored=¿Aburrido de esperar?
|
||||||
|
alphabet=Alfabeto
|
||||||
#############
|
#############
|
||||||
# HOME-PAGE #
|
# HOME-PAGE #
|
||||||
#############
|
#############
|
||||||
|
|
|
@ -20,6 +20,7 @@ close=Itxi
|
||||||
filesSelected=Hautatutako fitxategiak
|
filesSelected=Hautatutako fitxategiak
|
||||||
noFavourites=Ez dira gogokoak gehitu
|
noFavourites=Ez dira gogokoak gehitu
|
||||||
bored=Itxaroten aspertuta?
|
bored=Itxaroten aspertuta?
|
||||||
|
alphabet=Alfabetoa
|
||||||
#############
|
#############
|
||||||
# HOME-PAGE #
|
# HOME-PAGE #
|
||||||
#############
|
#############
|
||||||
|
|
|
@ -24,6 +24,7 @@ close=Fermer
|
||||||
filesSelected=fichiers sélectionnés
|
filesSelected=fichiers sélectionnés
|
||||||
noFavourites=Aucun favori ajouté
|
noFavourites=Aucun favori ajouté
|
||||||
bored=Ennuyé d'attendre ?
|
bored=Ennuyé d'attendre ?
|
||||||
|
alphabet=Alphabet
|
||||||
#############
|
#############
|
||||||
# HOME-PAGE #
|
# HOME-PAGE #
|
||||||
#############
|
#############
|
||||||
|
|
|
@ -20,6 +20,7 @@ close=Chiudi
|
||||||
filesSelected=file selezionati
|
filesSelected=file selezionati
|
||||||
noFavourites=Nessun preferito
|
noFavourites=Nessun preferito
|
||||||
bored=Stanco di aspettare?
|
bored=Stanco di aspettare?
|
||||||
|
alphabet=Alfabeto
|
||||||
#############
|
#############
|
||||||
# HOME-PAGE #
|
# HOME-PAGE #
|
||||||
#############
|
#############
|
||||||
|
|
|
@ -19,7 +19,8 @@ save=保存
|
||||||
close=閉じる
|
close=閉じる
|
||||||
filesSelected=選択されたファイル
|
filesSelected=選択されたファイル
|
||||||
noFavourites=お気に入りはありません
|
noFavourites=お気に入りはありません
|
||||||
bored=待ち時間が退屈?
|
bored=å¾…ã<EFBFBD>¡æ™‚é–“ã<EFBFBD>Œé€€å±ˆï¼
|
||||||
|
alphabet=\u30A2\u30EB\u30D5\u30A1\u30D9\u30C3\u30C8Ÿ
|
||||||
#############
|
#############
|
||||||
# HOME-PAGE #
|
# HOME-PAGE #
|
||||||
#############
|
#############
|
||||||
|
|
|
@ -20,6 +20,7 @@ close=닫기
|
||||||
filesSelected=개 파일 선택됨
|
filesSelected=개 파일 선택됨
|
||||||
noFavourites=즐겨찾기 없음
|
noFavourites=즐겨찾기 없음
|
||||||
bored=기다리는 게 지루하신가요?
|
bored=기다리는 게 지루하신가요?
|
||||||
|
alphabet=\uC54C\uD30C\uBCB3
|
||||||
#############
|
#############
|
||||||
# HOME-PAGE #
|
# HOME-PAGE #
|
||||||
#############
|
#############
|
||||||
|
|
|
@ -20,6 +20,7 @@ close=Zamknij
|
||||||
filesSelected=wybrane pliki
|
filesSelected=wybrane pliki
|
||||||
noFavourites=Nie dodano ulubionych
|
noFavourites=Nie dodano ulubionych
|
||||||
bored=Znudzony czekaniem?
|
bored=Znudzony czekaniem?
|
||||||
|
alphabet=Alfabet
|
||||||
#############
|
#############
|
||||||
# HOME-PAGE #
|
# HOME-PAGE #
|
||||||
#############
|
#############
|
||||||
|
|
|
@ -20,6 +20,7 @@ close=Fechar
|
||||||
filesSelected=arquivos selecionados
|
filesSelected=arquivos selecionados
|
||||||
noFavourites=Nenhum favorito adicionado
|
noFavourites=Nenhum favorito adicionado
|
||||||
bored=Entediado esperando?
|
bored=Entediado esperando?
|
||||||
|
alphabet=Alfabeto
|
||||||
#############
|
#############
|
||||||
# HOME-PAGE #
|
# HOME-PAGE #
|
||||||
#############
|
#############
|
||||||
|
|
|
@ -20,6 +20,7 @@ close=Închide
|
||||||
filesSelected=fișiere selectate
|
filesSelected=fișiere selectate
|
||||||
noFavourites=Niciun favorit adăugat
|
noFavourites=Niciun favorit adăugat
|
||||||
bored=Plictisit așteptând?
|
bored=Plictisit așteptând?
|
||||||
|
alphabet=Alfabet
|
||||||
#############
|
#############
|
||||||
# HOME-PAGE #
|
# HOME-PAGE #
|
||||||
#############
|
#############
|
||||||
|
|
|
@ -20,6 +20,7 @@ close=Закрыть
|
||||||
filesSelected=файлов выбрано
|
filesSelected=файлов выбрано
|
||||||
noFavourites=Нет избранного
|
noFavourites=Нет избранного
|
||||||
bored=Скучно ждать?
|
bored=Скучно ждать?
|
||||||
|
alphabet=\u0430\u043B\u0444\u0430\u0432\u0438\u0442
|
||||||
#############
|
#############
|
||||||
# HOME-PAGE #
|
# HOME-PAGE #
|
||||||
#############
|
#############
|
||||||
|
|
|
@ -20,6 +20,7 @@ close=Stäng
|
||||||
filesSelected=filer valda
|
filesSelected=filer valda
|
||||||
noFavourites=Inga favoriter har lagts till
|
noFavourites=Inga favoriter har lagts till
|
||||||
bored=Utråkad att vänta?
|
bored=Utråkad att vänta?
|
||||||
|
alphabet=Alfabet
|
||||||
#############
|
#############
|
||||||
# HEMSIDA #
|
# HEMSIDA #
|
||||||
#############
|
#############
|
||||||
|
|
|
@ -20,6 +20,7 @@ close=关闭
|
||||||
filesSelected=\u9009\u62E9\u7684\u6587\u4EF6
|
filesSelected=\u9009\u62E9\u7684\u6587\u4EF6
|
||||||
noFavourites=\u6CA1\u6709\u6DFB\u52A0\u6536\u85CF\u5939
|
noFavourites=\u6CA1\u6709\u6DFB\u52A0\u6536\u85CF\u5939
|
||||||
bored=\u65E0\u804A\u7B49\u5F85\uFF1F
|
bored=\u65E0\u804A\u7B49\u5F85\uFF1F
|
||||||
|
alphabet=\u5B57\u6BCD\u8868
|
||||||
#############
|
#############
|
||||||
# HOME-PAGE #
|
# HOME-PAGE #
|
||||||
#############
|
#############
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="fontSize" th:text="#{alphabet}"></label>
|
<label for="fontSize" th:text="#{alphabet} + ':'"></label>
|
||||||
<select class="form-control" name="alphabet" id="alphabet-select">
|
<select class="form-control" name="alphabet" id="alphabet-select">
|
||||||
<option value="romain">Roman</option>
|
<option value="romain">Roman</option>
|
||||||
<option value="arabic">العربية</option>
|
<option value="arabic">العربية</option>
|
||||||
|
|
Loading…
Reference in a new issue