fix: remove subpath support for HD_BASE_URL

With this commit we drop the subpath support which results in the constraint that HedgeDoc must always run on the root of a domain. This makes a lot of things in testing, rendering and security much easier.

Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
Tilman Vatteroth 2023-08-12 20:07:38 +02:00
parent 7401791ec8
commit dccd58f0c1
32 changed files with 111 additions and 116 deletions

View file

@ -13,7 +13,7 @@ declare namespace Cypress {
export const branding = {
name: 'DEMO Corp',
logo: 'public/img/demo.png'
logo: '/public/img/demo.png'
}
export const authProviders = [
@ -80,7 +80,7 @@ export const config = {
}
Cypress.Commands.add('loadConfig', (additionalConfig?: Partial<typeof config>) => {
return cy.intercept('api/private/config', {
return cy.intercept('/api/private/config', {
statusCode: 200,
body: {
...config,
@ -92,11 +92,11 @@ Cypress.Commands.add('loadConfig', (additionalConfig?: Partial<typeof config>) =
beforeEach(() => {
cy.loadConfig()
cy.intercept('GET', 'public/motd.md', {
cy.intercept('GET', '/public/motd.md', {
body: '404 Not Found!',
statusCode: 404
})
cy.intercept('HEAD', 'public/motd.md', {
cy.intercept('HEAD', '/public/motd.md', {
statusCode: 404
})
})