ONLYOFFICE / DocumentServer

ONLYOFFICE Docs is a free collaborative online office suite comprising viewers and editors for texts, spreadsheets and presentations, forms and PDF, fully compatible with Office Open XML formats: .docx, .xlsx, .pptx and enabling collaborative editing in real time.
https://www.onlyoffice.com
GNU Affero General Public License v3.0
4.74k stars 1.08k forks source link

meet with some problem on ssl #2824

Open Terryisthebest opened 1 month ago

Terryisthebest commented 1 month ago

This issue is unique.

Operating System of DocumentServer

Docker

Version information

7.2

Expected Behavior

I want to preview the files in my Alist.

Actual Behavior

it said it failed to download.

Reproduction Steps

here's the log:

[2024-07-30T14:55:28.820] [ERROR] nodeJS - error downloadFile:url=http://www.terryliu.top:2505/p/文件共享平台/高中学习资料/来自0740/2022年上海教育考试院版《高考英语词汇手册》新增考纲词汇pdf_1.pdf?sign=Jlgeatx0lOViXzAuxhJwzgSY5EzZ0-LZ2PnTQKGkwZ8=:0;attempt=3;code:null;connect:null;(id=214135645731db79bbd6) Error: Error response: statusCode:400; headers:{"date":"Tue, 30 Jul 2024 14:55:28 GMT","server":"Apache/2.4.55 (Unix) OpenSSL/1.1.1t","content-length":"362","connection":"close","content-type":"text/html; charset=iso-8859-1"}; body: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">

400 Bad Request

Bad Request

Your browser sent a request that this server could not understand.
Reason: You're speaking plain HTTP to an SSL-enabled server port.
Instead use the HTTPS scheme to access this URL, please.

at Request._callback (/snapshot/server/build/server/Common/sources/utils.js:0:0)
at Request.init.self.callback (/snapshot/server/build/server/Common/node_modules/request/request.js:185:22)
at Request.emit (events.js:198:13)
at Request.<anonymous> (/snapshot/server/build/server/Common/node_modules/request/request.js:1154:10)
at Request.emit (events.js:198:13)
at IncomingMessage.<anonymous> (/snapshot/server/build/server/Common/node_modules/request/request.js:1076:12)
at Object.onceWrapper (events.js:286:20)
at IncomingMessage.emit (events.js:203:15)
at endReadableNT (_stream_readable.js:1145:12)
at process._tickCallback (internal/process/next_tick.js:63:19)

My downloading url should begin with https, but it's http. I viewed the js file(https://www.terryliu.top:2581/web-apps/apps/api/documents/api.js),and found this:

customerId: , region: // can be 'en-us' or lang code

            user: {
                id: 'user id',
                name: 'user name',
                group: 'group name' // for customization.reviewPermissions parameter
            },
            recent: [
                {
                    title: 'document title',
                    url: 'document url',
                    folder: 'path to document',
                },
                ...
            ],
            templates: [
                {
                    title: 'template name', // name - is deprecated
                    image: 'template icon url',
                    url: 'http://...'
                },
                ...
            ],
            customization: {
                logo: {
                    image: url,
                    imageEmbedded: url,
                    url: http://...
                },
                customer: {
                    name: 'SuperPuper',
                    address: 'New-York, 125f-25',
                    mail: 'support@gmail.com',
                    www: 'www.superpuper.com',
                    info: 'Some info',
                    logo: ''
                },
                about: true,
                feedback: {
                    visible: false,
                    url: http://...
                },
                goback: {
                    url: 'http://...',
                    text: 'Go to London',
                    blank: true,
                    requestClose: false // if true - goback send onRequestClose event instead opening url
                },
                reviewPermissions: {
                    "Group1": ["Group2"], // u

all of them are http. I don't know whether that's the problem...

Additional information

I'm just a student. I'm using Qnap Container Station to run the program. Could any one help me???

igwyd commented 1 month ago

Hello @Terryisthebest, from the information you provided it is not clear where the SSL came from. Did you hardcode it somewhere? I suggest you start with our language examples, including for frameworks, and then write your own integration.

Terryisthebest commented 2 weeks ago
iShot_2024-08-25_20 46 02 iShot_2024-08-25_20 46 42 iShot_2024-08-25_20 47 54

How to solve it? Help me!!

igwyd commented 1 week ago

The problem is in your integration, I repeat my previous post, first try to use our examples, make sure they work for you, and then try to write your own.