Hi I am trying to add a pdf web view to my vue js vuetify project. I choose vue-pdf https://github.com/FranckFreiburger/vue-pdf for that.
My pdf src is directly come as a URL and code is like this.
<template>
<pdf src="https://lovezwl.vip/pdf.pdf"></pdf>
</template>
<script>
import pdf from 'vue-pdf'
export default {
components: {
pdf
}
}
Then I got an error
Access to fetch at 'https://lovezwl.vip/pdf.pdf' from origin 'http://localhost:8083' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
As far as I know CORS is something to deal with the server, not in the front end. But this moment I can't do anything in the back-end, I have to figure out a way from front-end. Is there any way to over come this error.
Or else do you guys know any other library works well with URLS as pdf sources?