fix router.js

This commit is contained in:
sparkcyf 2022-06-10 22:05:35 +08:00
parent f150a84a80
commit b9f430631b
2 changed files with 2 additions and 1 deletions

View File

@ -29,7 +29,7 @@ RUN npm config set registry https://registry.npmmirror.com
RUN git clone https://mirrors.sustech.edu.cn/git/sustech-cra/overleaf-ldap-oauth2.git /src RUN git clone https://mirrors.sustech.edu.cn/git/sustech-cra/overleaf-ldap-oauth2.git /src
RUN cat /src/ldap-overleaf-sl/sharelatex/router-append.js RUN cat /src/ldap-overleaf-sl/sharelatex/router-append.js
RUN head -n -1 /overleaf/services/web/app/src/router.js > temp.txt ; mv temp.txt /overleaf/services/web/app/src/router.js RUN head -n -2 /overleaf/services/web/app/src/router.js > temp.txt ; mv temp.txt /overleaf/services/web/app/src/router.js
RUN cat /src/ldap-overleaf-sl/sharelatex/router-append.js >> /overleaf/services/web/app/src/router.js RUN cat /src/ldap-overleaf-sl/sharelatex/router-append.js >> /overleaf/services/web/app/src/router.js
# recompile # recompile

View File

@ -2,4 +2,5 @@
webRouter.get('/oauth/callback', AuthenticationController.oauth2Callback) webRouter.get('/oauth/callback', AuthenticationController.oauth2Callback)
AuthenticationController.addEndpointToLoginWhitelist('/oauth/redirect') AuthenticationController.addEndpointToLoginWhitelist('/oauth/redirect')
AuthenticationController.addEndpointToLoginWhitelist('/oauth/callback') AuthenticationController.addEndpointToLoginWhitelist('/oauth/callback')
webRouter.get('*', ErrorController.notFound)
} }