Im using netlify identity to protect https://www.fabian9799.de/log
the index file in the log folder also loads a script located in the same folder but its not loading when im loggin in and i try to acces the /log path.
my _redirects file contains the following code, and should work according to the documentation /log/* 200! Role=admin
but to make it work i have to load the script from this url: <script src="https://www.fabian9799.de/log/script.js"></script>
instead of <script src="script.js"></script>
shouldn’t this work with only script.js as the source, instead of the full url, since i added a * to the redirects file?
It looks like this thread has been a bit quiet since you last posted. Are you still encountering this issue? If so, what additional debugging steps have you taken?
I tried all different combinations that were in the documentation but none of them worked for me. Is there a example somwhere which protects a page which loads a script from a folder?
That redirect looks reasonable to me. I don’t understand any reason why the load of /log/script.js would be different from a load of script.js from /log/index.html .
Can you show me the HTML page that has the link that doesn’t work, so I can see the code and where it is called from?
That worked.Thanks for the help.
Its just a little bit confusing for me why its not working with only the filename, since it should normally work since its in the same folder and it works on other non gated pages
/log/index.html is in fact served as /log – rather than being exposed as a file called index.html under the /log directory, it’s a file called log under the / directory.
However…
…if what you’re seeing is that you have, for example, /test/index.html which isn’t gated and doesn’t need to reference /script.js as /test/script.js please let me know