question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Generated script/resource urls are rooted, can they be relative?

See original GitHub issue

Have you read the Contributing Guidelines on issues?

Description

Lovely project ❤️

The urls generated for scripts etc are rooted urls. That is they start with / e.g.: <script src="/_next/static/chunks/webpack-203a6ceb71ee99ad.js">

However if the index.html is not hosted in the web side root, e.g. “http://example.com/event-catalog/index.html”, loading the page will result in 404s and a broken site.

Steps to reproduce

  1. Buld site.
  2. Host on a path, not on a root.

Expected behavior

Urls should be non-rooted / relative.

e.g. <script src=“_next/static/chunks/webpack-203a6ceb71ee99ad.js”

Note, no / at start.

Actual behavior

image

Your environment

  • EventCatalog version used: “@eventcatalog/core”: “0.2.19”
  • Environment name and version (e.g. Chrome 89, Node.js 16.4): Node v14.18.0
  • Operating system and version (e.g. Ubuntu 20.04.2 LTS): Win 11.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:8 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
boyney123commented, Jul 6, 2022

Thanks @dytyniuk for helping out on this one 🙏🙇

@damianh will close for now, if you have any more issues feel free to reopen 😃.

1reaction
dytyniukcommented, Jul 4, 2022

Hello @boyney123

Could you be so kind and label this issue as “not a bug” and “Implemented”, please? 😉

Read more comments on GitHub >

github_iconTop Results From Across the Web

Change the requested url of WebResource.axd
This intercepts the stream to the page and replaces all occurrences of "/WebResource.axd" with "WebResource.axd". As it's a relative path it resolves ...
Read more >
Relative URLs | ASP.NET - Andrew's Tutorials
If we create a new folder, and place a new page based on our masterpage in it, its links will be relative to...
Read more >
ScriptManager uses Website-root instead of Application root ...
The application named 'TestPfade' is located under the website's root named 'Default'. It is not only a virtual directory but defined as an ......
Read more >
Understanding Relative Urls - Brian Vander Plaats
With this change, the leading / indicates the root of the website. It is still a relative path, but it is “relative” to...
Read more >
ASP.NET Routing… Goodbye URL rewriting?
Added a new post that might help you resolve issues with relative file ... NET page (if you want to use an ASPX...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found