Investigate htaccess restricted backend.
Is your feature request related to a problem? Please describe. Support request via Discord mentioned they couldn’t access a htaccess restricted backend.
Describe the solution you'd like Test, confirm, and if valid, resolve issue.
Describe alternatives you've considered N/A
Additional context N/A
Hi, our test backends / features are behind .htaccess. The domains for the features are created on gitlab ci. So when i just add the domain in my nuxt.config file i get an unauthorized error which is correct because i didnt set any credentials.
i tryed to install nuxt-auth and set the credentials with no luck so thats why i ask if there is any possibility to set the credentials and get that working.
I want to give someone our backend for testing and my code repository on github but the .htaccess should stay. So my question is: Is there a way (maybe in the druxt {} object beside the domain, where i can set credentials for .htaccess?)
It should be possible to set your Basic Auth headers doing something like this:
druxt: {
axios: {
headers: {}
},
baseUrl: ''
}
See here for more details: https://github.com/axios/axios#creating-an-instance
Hi @Decipher ,
As I mentioned in the Slack channel, I tried this, but it's adding an "undefined" plugin entry for some reason. As a result, the Nuxt builder complains about it.
FYI: I have all the latest versions of Druxt and Nuxt.
Sorry the versions are as below:
[email protected]
├─┬ [email protected] │ ├── [email protected] │ ├─┬ [email protected] │ │ └── [email protected] deduped │ └─┬ [email protected] │ └── [email protected] deduped └─┬ [email protected] ├── [email protected] deduped ├─┬ [email protected] │ └── [email protected] deduped ├─┬ [email protected] │ └── [email protected] deduped ├─┬ [email protected] │ └── [email protected] deduped └─┬ [email protected] └── [email protected] deduped
├─┬ [email protected] │ ├── [email protected] │ ├─┬ [email protected] │ │ └── [email protected] deduped │ └─┬ [email protected] │ └── [email protected] deduped └─┬ [email protected] ├── [email protected] deduped ├─┬ [email protected] │ └── [email protected] deduped ├─┬ [email protected] │ └── [email protected] deduped ├─┬ [email protected] │ └── [email protected] deduped └─┬ [email protected] └── [email protected] deduped
https://github.com/nuxt/nuxt/issues/24301 was the solution for me.